-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
AttributeError: 'super' object has no attribute '__sklearn_tags__' #30542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
#XGBoost Classification model instantiate the modelxgb = XGBClassifier(learning_rate=0.4,max_depth=7, method='logloss') |
Did you fix this error? If yes, can you tell me how? |
Since this is with XGBoost, it has been resolved in: dmlc/xgboost#11021 |
thanks, do you know when this version gonna be published? |
Hopefully in future, when adding such breaking releases, some fallback mechanics will be considered by core devs. This sklearn_tags thing has totally broken xgboost python objects usage. |
bug in 1.6: scikit-learn/scikit-learn#30542 we need the next release of xgboost (> 2.1.3), which is not out yet
I could solved locally only fixing the version of scikit-learn to 1.5.2 |
Is there an updated date for releasing the fix? |
This is not a bug, but a change in scikit-learn 1.6. The way the tag infrastructure works has been modernised. In particular we are trying to move towards having an official developer API. For example tags were something that was considered internal, but in reality was used by third party estimators. There was no great way of getting on the path of improvement without the changes in 1.6. So apologies for the pain, but hopefully it is worth it in the long term. TL;DR: your estimator class has to inherit from the base estimator in scikit-learn. You don't have to inherit from the base estimator, but in that case you need to provide a lot of infrastructure yourself. In this case the Some more details, advice and explanation is in https://blog.scikit-learn.org/updates/dev-api/ There is also a new library that helps make it easier for third party libraries to be compatible with multiple versions of scikit-learn, sklearn-compat. It contains a helper for this case https://github.com/sklearn-compat/sklearn-compat?tab=readme-ov-file#tags-__sklearn_tags__-and-estimator-tags |
I installed version 1.3.2 and it is working for me |
I tried with version 1.3.2 , it is not working for me |
version 1.3.2 doesn't work for me also |
1.5.2 is ok !! |
Describe the bug
Steps/Code to Reproduce
.
Expected Results
Working XGBClassifier model
Actual Results
None
Versions
The text was updated successfully, but these errors were encountered: