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

[tune] Adjust searcher sample bounds to match Tune API #15899

Merged
merged 13 commits into from
Jun 11, 2021

Conversation

krfricke
Copy link
Contributor

Why are these changes needed?

We're currently passing searcher bounds directly to search algorithms - however, while we e.g. define randint's upper bound to be exclusive, this is not the case for other search algorithms (e.g. Optuna).

This PR adds a more thorough testing framework to check the sampling behavior of all our searchers. It makes sure that the sampled values from any searcher is within the bounds defined by the Tune search space API. It also checks that (at least for discrete values) the search space is sampled extensively (i.e. that the highest and lowest discrete values are sampled, too, so that we didn't cut off too much of the search space).

Related issue number

Closes #15593

Checks

  • 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 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 :(

Copy link
Contributor

@richardliaw richardliaw left a comment

Choose a reason for hiding this comment

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

Looks fine but did not carefully review.

Can we add this note somewhere in the docstrings for the tune search space primitives? Perhaps as a changelog?

https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-versionchanged

@krfricke krfricke merged commit e8f8e9f into ray-project:master Jun 11, 2021
@krfricke krfricke deleted the searcher-bounds branch June 11, 2021 13:31
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] With optuna randint's upper bound looks inclusive.
2 participants