-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[tune] Multi-objective support for Optuna #20489
Conversation
We may have fields in the result dict that are or None. Make sure our results are json serializable.
# If only a mode was passed, use anonymous metric | ||
self._metric = DEFAULT_METRIC | ||
|
||
pruner = ot.pruners.NopPruner() | ||
storage = ot.storages.InMemoryStorage() | ||
|
||
if self._sampler: | ||
sampler = self._sampler |
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.
[note] Following samplers don't support multi-objective optimization. So, when self._mode
is a list and self._sampler
is one of them, Optuna would raise an exception (You can choose other samplers listed in https://optuna.readthedocs.io/en/stable/reference/samplers.html).
- https://optuna.readthedocs.io/en/stable/reference/generated/optuna.samplers.CmaEsSampler.html#optuna.samplers.CmaEsSampler
- https://optuna.readthedocs.io/en/stable/reference/generated/optuna.integration.PyCmaSampler.html#optuna.integration.PyCmaSampler
- https://optuna.readthedocs.io/en/stable/reference/generated/optuna.integration.SkoptSampler.html#optuna.integration.SkoptSampler
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 think it's fine to let Optuna raise it here.
BTW. would it be possible for Optuna to add a property to its samplers that would inform whether the sampler can support multi-objective optimization?
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.
would it be possible for Optuna to add a property to its samplers that would inform whether the sampler can support multi-objective optimization?
Nice question. Such property is not available now but I'll discuss this with other developers. 👀
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.
Looks great! Thanks!
Why are these changes needed?
Adds support for multi-objective optimization to
OptunaSearch
. Adds test, example, docs.Related issue number
Closes #18027
Checks
scripts/format.sh
to lint the changes in this PR.