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

updated optuna_search to allow users to configure optuna storage #48547

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

ravi-dalal
Copy link

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

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • [] Release tests
    • This PR is not tested :(

@ravi-dalal
Copy link
Author

@hongpeng-guo @justinvyu @matthewdeng @raulchen @woshiyyya could you please take a look at this PR?

Copy link
Contributor

@hongpeng-guo hongpeng-guo left a 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.

@ravi-dalal
Copy link
Author

@hongpeng-guo Thank you for taking time to review this PR. I updated the PR following your comments. PTAL when you get time.

@ravi-dalal
Copy link
Author

@hongpeng-guo gentle reminder to take another look at this PR. Thank you!

@ravi-dalal
Copy link
Author

@hongpeng-guo @justinvyu @matthewdeng apologies for bugging you again. could you please take a look at this PR? I think it is very close to be ready to get merged, so you may not have to spend much time on it. Thanks!

Copy link
Contributor

@hongpeng-guo hongpeng-guo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for contributing! I think it looks good in general. Could you please add some unit tests before we can merge this PR?

@ravi-dalal
Copy link
Author

@hongpeng-guo is python/ray/tune/tests/test_searchers.py the right place to add unit tests?

@hongpeng-guo
Copy link
Contributor

@hongpeng-guo is python/ray/tune/tests/test_searchers.py the right place to add unit tests?

Yes, it is the correct place to test optuna searchers. Basically, we want to show that when storage are configured, the testOptuna functions are still functions as exepcted.

@ravi-dalal
Copy link
Author

ravi-dalal commented Nov 26, 2024

@hongpeng-guo is python/ray/tune/tests/test_searchers.py the right place to add unit tests?

Yes, it is the correct place to test optuna searchers. Basically, we want to show that when storage are configured, the testOptuna functions are still functions as exepcted.

Thanks for confirmation, @hongpeng-guo . I added storage to existing testOptuna functions. PTAL. Let me know if you would prefer to add separate functions instead of updating existing ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tune] Allow Storage to be configurable for OptunaSearch
3 participants