Hydra optuna sweeper plugin which suports pruning #2788
DirkKuhn
started this conversation in
Show and tell
Replies: 1 comment
-
I implemented Optuna pruning with Hydra without any external dependencies. The objective function uses the Hydra internals to suggest |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have been using hydra and optuna for a couple of months now. Since I wanted to use a pruner with hydra, I have developed an optuna sweeper which supports pruning among other features.
Here are its advantages over the original Optuna Sweeper plugin:
optuna.integration.DaskStorage
simply by specifying
n_workers>1
.optuna.integration.DaskStorage
by specifying a daskClient
.optuna.study.Study.optimize
which can be freely configured.
optuna>=3.1.0
. This is only an advantage until keisuke-umezawa's Pull Request is merged.Before anyone gets too exited there are also some disadvantages/limitations:
BasicLauncher
. Different launchers like the Submitit Launcher plugin are not supported.search_space
from the original has been removed.optuna
anddask.distributed
. Both might be imported even if this plugin is not used and thus, once installed, it can slow down starting hydra.If you are interested please check out the repository. In the README file I have outlined the usage which is mostly similar to the original optuna sweeper and my design decisions. In the examples package you can find the adapted examples from the original optuna sweeper. I have also implemented a deep-learning example with pytorch lightning which showcases the new sweeper with a more complicated configuration using hydra and hydra-zen.
Since I have not published any code before, I would be happy about any feedback.
Thank you for your interest!
Beta Was this translation helpful? Give feedback.
All reactions