xgboost icon indicating copy to clipboard operation
xgboost copied to clipboard

Key for metric doesn't seem to be correct

Open astro-kevin opened this issue 10 months ago • 3 comments

I'm trying to use Ray to do a Hyperparameter search via the sklearn API. In there, one of the callback function RayTrainReportCallback requires the key of the XGBoost metric. Since I'm using XGBoostRegressor, I would think the key should be validation_0-rmse. But this, and all other variations of that throw a key error.

Can someone tell me what the correct key should be, or at least how to reveal the dictionary of metrics?

astro-kevin avatar Mar 10 '25 00:03 astro-kevin

Could you please open the issue in xgboost_ray? I'm not familiar with the ray interface.

trivialfis avatar Mar 10 '25 05:03 trivialfis

I don't believe xgboost_ray is still supported. I have been having trouble using that package (which you'll see the latest issue being created by me too). I've since moved to use xgboost (with the sklearn API) with ray/ray-tune. Since that requires access to a key for a metric in xgboost, it should belong to the xgboost repo? I can open an issue in ray too, but I don't know if this belongs there more.

astro-kevin avatar Mar 11 '25 10:03 astro-kevin

Could you please share a snippet that I can run and debug? I need a starting point to see what's happening.

trivialfis avatar Mar 11 '25 12:03 trivialfis

Closing due to stalled. Feel free to reopen if there's a reproducible example.

trivialfis avatar Jul 24 '25 19:07 trivialfis