Inconsistent Dynamic Parameter Handling in Optuna Ask-Tell Interface with Conditional Trials #5439
Labels
bug
Issue/PR about behavior that is broken. Not for typos/examples/CI/test but for Optuna itself.
Expected behavior
I'm encountering unexpected behavior when using the Optuna ask-tell interface with dynamic search spaces and conditional trials. The issue manifests as the dynamic parameter being treated as a separate parameter at each iteration, even though it's intended to be the same parameter across iterations.
Within the ask-tell interface, I anticipate that the ask-tell interface would recognize the dynamic parameter as a single entity throughout the optimization process. This implies that the value provided by the tell method should be used for subsequent ask calls with the same parameter name, regardless of the trial iteration.
This behavior isn't confined to the Optuna dashboard; it also affects core Optuna functionality. For instance, if I reload a study and attempt a new optimization using study.optimize, the conditional trial's dynamic parameter isn't carried over to subsequent trials.
Environment
Error messages, stack traces, or logs
Steps to reproduce
Example 1
Example 2
Example 3
Evidence this affects following steps
Gives results:
Expected y for trials from 10 to 19 to be 0 (as mutation probability is 0)
Setting in the first loop:
correctly returns:
Additional context (optional)
It is important ask-tell interface can deal with conditional search space, as it is one of the most usefull application of such interface itself.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: