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] lazy trials #10802

Merged
merged 9 commits into from
Sep 17, 2020
Merged

[tune] lazy trials #10802

merged 9 commits into from
Sep 17, 2020

Conversation

krfricke
Copy link
Contributor

Why are these changes needed?

Create Trial objects one by one from search algorithms. This way the scheduled trials get naturally limited by concurrency limits of the searcher (through ConcurrencyLimiter) and the TrialRunner (through resources).

Related issue number

#10138

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/latest/.
  • 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 :(

@krfricke
Copy link
Contributor Author

Open question: Should we remove the next_trials() method completely in favor for next_trial()?

@richardliaw richardliaw changed the title Tune lazy trials [tune] lazy trials Sep 15, 2020
Comment on lines 83 to 87
def next_trials(self):
"""Provides Trial objects to be queued into the TrialRunner.

Returns:
trials (list): Returns a list of trials.
List[Trial]: A list of trials for the Runner to consume.
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah let's remove

Kai Fricke added 3 commits September 16, 2020 09:47
# Conflicts:
#	python/ray/tune/suggest/basic_variant.py
#	python/ray/tune/suggest/search.py
#	python/ray/tune/suggest/search_generator.py
@krfricke
Copy link
Contributor Author

I added the total number of samples to the printout. Also implemented (virtually) infinite samples when num_samples=-1

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.

nice! the output looks great too.

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.

None yet

2 participants