-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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 V.2.0.2 does not recognize 'reg:quantileerror' as a valid objective function #9912
Comments
How did you install XGBoost? I could not reproduce the error when I installed XGBoost 2.0.3 using |
I used "conda install -c conda-forge py-xgboost". Now I upgraded to v.2.0.3 using "pip3 install xgboost==2.0.3" and get the same error. |
Can you install XGBoost again? It appears that your XGBoost installation is somehow corrupted. |
I uninstalled and reinstalled xgboost using "pip install xgboost". The version is 2.0.3. I get the same result. Not sure what is going on. |
Could you please print out the XGB version before the training code? import xgboost
print(xgboost.__version__)
...
booster = xgb.train(
{
# Use the quantile objective function.
"objective": "reg:quantileerror",
"tree_method": "hist",
"quantile_alpha": alpha,
# Let's try not to overfit.
"learning_rate": 0.04,
"max_depth": 5,
},
Xy,
num_boost_round=32,
early_stopping_rounds=2,
# The evaluation result is a weighted average across multiple quantiles.
evals=[(Xy, "Train"), (Xy_test, "Test")],
evals_result=evals_result,
) |
import xgboost |
Could you please share the complete error message? |
XGBoostError: [06:08:55] C:\buildkite-agent\builds\buildkite-windows-cpu-autoscaling-group-i-08de971ced8a8cdc6-1\xgboost\xgboost-ci-windows\src\objective\objective.cc:26: Unknown objective function: |
@hcho3 Did you try it on Windows? I don't understand why the objective isn't registered. |
Yes, I am working in Windows. I don't understand either. |
I just tried running |
I don't know if they are related, but using the R package (v1.7.7.1 binary from CRAN) when I attempt to use
yields this error:
The stack trace is cut off as I've shown it, there isn't anything more printed to the console. Specifying another optional objective function, e.g. |
R is on 1.7.x, which doesn't include quantile function yet. We are working on the R interface, see #9810 . |
Same error here for version 2.0.3. The interesting thing is that: if I run |
Closing due to unable to reproduce. Feel free to reopen if you can share the environment for debugging. |
import xgboost as xgb
xgb.version
Out[203]: '2.0.2'
booster = xgb.train(
{
# Use the quantile objective function.
"objective": "reg:quantileerror",
"tree_method": "hist",
"quantile_alpha": alpha,
# Let's try not to overfit.
"learning_rate": 0.04,
"max_depth": 5,
},
Xy,
num_boost_round=32,
early_stopping_rounds=2,
# The evaluation result is a weighted average across multiple quantiles.
evals=[(Xy, "Train"), (Xy_test, "Test")],
evals_result=evals_result,
)
XGBoostError: [11:04:05] C:\buildkite-agent\builds\buildkite-windows-cpu-autoscaling-group-i-08de971ced8a8cdc6-1\xgboost\xgboost-ci-windows\src\objective\objective.cc:26: Unknown objective function:
reg:quantileerror
According to the documentation, quantile error is implemented in v.2.0.2. What am I missing? Thank you.
The text was updated successfully, but these errors were encountered: