-
Notifications
You must be signed in to change notification settings - Fork 524
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
support xgboost 2.0 #1219
support xgboost 2.0 #1219
Conversation
|
that test doesn't use xgboost 2. It uses xgboost 1.7. Could you check why it fails with the spark test? |
what do you mean with "it uses xgboost 1.7"? This test can pass with xgboost 1.7.0. In spark tests, it only parallize the trials with spark. |
xgboost 1.7 is installed for this test: https://github.com/microsoft/FLAML/actions/runs/6180225370/job/16776350218?pr=1219#step:8:89 |
hello @sonichi , I fixed small deprecated import error in notebook. May this help. |
Thanks. The test still fails. |
I'm still working on this test. According to my local test, this issue is most likely due to the inconsistency of xgboost version between pyspark driver and executor. I'm figuring out why the |
Very weired, it passed when test only test/spark. https://github.com/microsoft/FLAML/actions/runs/6258815880/job/16993596238?pr=1219#step:13:24 |
flaml/automl/model.py
Outdated
if xgboost_version < "1.7.0": | ||
params["use_label_encoder"] = params.get("use_label_encoder", False) | ||
else: | ||
assert "use_label_encoder" not in params, "use_label_encoder is deprecated in xgboost>=1.7.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to assert here. Assert will slow down the training process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to find the bug. This assert doesn't fail, so "use_label_encoder" is indeed not in params with xgboost 2.
So, why does error about "use_label_encoder" happen? Does any executor use xgboost < 1.7.0 for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that the bug is fixed now. Then we can remove this assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to find the bug. This assert doesn't fail, so "use_label_encoder" is indeed not in params with xgboost 2. So, why does error about "use_label_encoder" happen? Does any executor use xgboost < 1.7.0 for some reason?
In the macOS test, 1.7.6 is actually the version we want to use. But somehow the version in spark driver is upgraded to 2.0.0. The root cause is that in test/automl/test_classification.py::fix test_sparse_matrix_xgboost
, it will first downgrade xgboost to 1.3.3 and then upgrade it to 2.0.0. Which makes in the spark test, the driver will have version 2.0.0 and executor will have 1.7.6 since the upgrade in test_sparse_matrix_xgboost
only affects driver.
Why are these changes needed?
Trying to support xgboost 2.0
Related issue number
close #1217
Checks