Skip to content
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

Xgboost : AttributeError: 'Booster' object has no attribute 'best_ntree_limit' #649

Closed
adrienpacifico opened this issue Sep 12, 2023 · 4 comments
Assignees

Comments

@adrienpacifico
Copy link
Contributor

On a fresh install of MLJar, I get the following error when launching automl.predict.

Xgboost has introduced a version 2.0, 11 hours ago on Pipy.

@yamenw
Copy link

yamenw commented Sep 12, 2023

I am also experiencing the same issue on a fresh install, the other classifiers are working as expected, but Xgboost writes this error to error.md:

'Booster' object has no attribute 'best_ntree_limit' Traceback (most recent call last): File "C:\Users\user\anaconda3\lib\site-packages\supervised\base_automl.py", line 1195, in _fit trained = self.train_model(params) File "C:\Users\user\anaconda3\lib\site-packages\supervised\base_automl.py", line 401, in train_model mf.train(results_path, model_subpath) File "C:\Users\user\anaconda3\lib\site-packages\supervised\model_framework.py", line 254, in train learner.fit( File "C:\Users\user\anaconda3\lib\site-packages\supervised\algorithms\xgboost.py", line 247, in fit self.best_ntree_limit = self.model.best_ntree_limit AttributeError: 'Booster' object has no attribute 'best_ntree_limit'

This is on Windows + Anaconda + Python 3.10.9 + AutoML version 1.0.2

@adrienpacifico
Copy link
Contributor Author

@yamenw
pip install xgboost==1.7.6 will probably solve the issue.

@yamenw
Copy link

yamenw commented Sep 12, 2023

@adrienpacifico That fixed the problem for me, thanks a lot!

@pplonski
Copy link
Contributor

I've fixed the issue. MLJAR AutoML will use Xgboost in version > 2.0.0. The new release should be soon 👍

@pplonski pplonski self-assigned this Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants