-
Notifications
You must be signed in to change notification settings - Fork 6k
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
updated optuna_search to allow users to configure optuna storage #48547
Conversation
Signed-off-by: Ravi Dalal <[email protected]>
Signed-off-by: Ravi Dalal <[email protected]>
Signed-off-by: Ravi Dalal <[email protected]>
Signed-off-by: Ravi Dalal <[email protected]>
@hongpeng-guo @justinvyu @matthewdeng @raulchen @woshiyyya could you please take a look at this PR? |
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.
@ravi-dalal Thanks for contributing to the ray project! Left a few comments. One question that I have is on the study_name argument, please elaborate more why this arg is necessary to be here with the storage.
Signed-off-by: Ravi Dalal <[email protected]>
Signed-off-by: Ravi Dalal <[email protected]>
@hongpeng-guo Thank you for taking time to review this PR. I updated the PR following your comments. PTAL when you get time. |
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.
@ravi-dalal Thanks for your contribution! PR LGTM.
cc @matthewdeng for one more pass before merge this PR.
python/requirements_compiled.txt
Outdated
@@ -1519,7 +1516,7 @@ py-cpuinfo==9.0.0 | |||
# via deepspeed | |||
py-partiql-parser==0.5.0 | |||
# via moto | |||
py-spy==0.4.0 ; python_version < "3.12" | |||
py-spy==0.3.14 |
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.
@hongpeng-guo I think we need to rebase/pull in the latest compiled dependencies here. This was modified in 73a4c42
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.
Nice catch!
else: | ||
self._storage = ot.storages.InMemoryStorage() |
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.
InMemoryStorage
only exists in Optuna 4.x. Let's just pass in None, which works for both 3.x and 4.x:
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.
Good catch! Let me quickly fix it.
Signed-off-by: Hongpeng Guo <[email protected]>
…/tune/optuna_fix
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.
Thanks, just some nits.
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: Hongpeng Guo <[email protected]>
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: Hongpeng Guo <[email protected]>
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.
cc @justinvyu @matthewdeng, merge this one?
ray-project#48547) The OptunaSearch currently uses in-memory storage and does not provide a way to configure any other storages (e.g. database). This update add a configurable parameter to OptunaSearch that can be set to a valid Optuna Storage. Signed-off-by: Ravi Dalal <[email protected]> Signed-off-by: Ravi Dalal <[email protected]> Signed-off-by: Hongpeng Guo <[email protected]> Co-authored-by: Hongpeng Guo <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: Hongpeng Guo <[email protected]> Co-authored-by: Justin Yu <[email protected]>
ray-project#48547) The OptunaSearch currently uses in-memory storage and does not provide a way to configure any other storages (e.g. database). This update add a configurable parameter to OptunaSearch that can be set to a valid Optuna Storage. Signed-off-by: Ravi Dalal <[email protected]> Signed-off-by: Ravi Dalal <[email protected]> Signed-off-by: Hongpeng Guo <[email protected]> Co-authored-by: Hongpeng Guo <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: Hongpeng Guo <[email protected]> Co-authored-by: Justin Yu <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Why are these changes needed?
The OptunaSearch currently uses in-memory storage and does not provide a way to configure any other storages (e.g. database). This update add a configurable parameter to OptunaSearch that can be set to a valid Optuna Storage.
Related issue number
Closes #48500
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.