Skip to content
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

[TODO]: Add Optuna support for hyperparameter optimization #783

Open
hwpang opened this issue Apr 12, 2024 · 1 comment
Open

[TODO]: Add Optuna support for hyperparameter optimization #783

hwpang opened this issue Apr 12, 2024 · 1 comment
Labels
enhancement a new feature request todo add an item to the to-do list
Milestone

Comments

@hwpang
Copy link
Contributor

hwpang commented Apr 12, 2024

See: #734

I was testing hyperparameter optimization function. raytune + hyperopt works fine. raytune + optuna, however, it seems that it couldn't handle the nested distribution search space such as below.

"dropout": tune.choice([tune.choice([0.0]), tune.quniform(lower=0.05, upper=0.4, q=0.05)]),
The best config is returned as

{'train_loop_config': {'ffn_hidden_size': 700.0, 'hidden_size': 1700.0, 'ffn_num_layers': 3, 'depth': 2, 'dropout': <ray.tune.search.sample.Categorical object at 0x7fc8932f40d0>}}
while something like this is expected

{'train_loop_config': {'ffn_hidden_size': 700.0, 'hidden_size': 1700.0, 'ffn_num_layers': 3, 'depth': 2, 'dropout': 0}}
I'm inclined to comment out the relevant code for now for the v2.0 release deadline and only support random search and hyperopt search algorithm. We can keep track of this in the future.

@hwpang hwpang added the todo add an item to the to-do list label Apr 12, 2024
@hwpang hwpang added this to the v2.1.0 milestone Apr 12, 2024
@davidegraff davidegraff added the enhancement a new feature request label Apr 12, 2024
@shihchengli
Copy link
Contributor

As discussed in last week's meeting, we might be able to repeat the zeros multiple times with the other possible values in a tune.choice to bypass the issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a new feature request todo add an item to the to-do list
Projects
None yet
Development

No branches or pull requests

3 participants