Closed Arturossi closed 7 months ago
Could you use optuna discussion since this issue's code is not related to optuna-example?
This is not a bug. As a warning message saying, optuna doesn't allow us to report an intermediate objective value at the same step per trial. The script trains the xgboost model in run_xboost
and this function should be called once. However, the script calls it multiple times via the genetic algorithm in a trial.
I believe that this is a bug, but before reporting it as a bug I would like to be sure first, so I decided to post it as a question.
When running Optuna with XGBoost callback it prompts the error:
UserWarning: The reported value is ignored because this is already reported.
step
I then started to check how I was implementing if I did something wrong since I was using multithread/multiprocess. But even running it single thread/process I was still having this warning. When I removed the callback, the warning has stopped to prompt.
Environment
Error messages, stack traces, or logs
More information
Reproducible examples (optional)