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] Allow to set buffer_length via tune.run #15810

Merged
merged 3 commits into from
May 17, 2021

Conversation

llan-ml
Copy link
Contributor

@llan-ml llan-ml commented May 14, 2021

See discussion here.

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

@krfricke krfricke left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

One thing I'm wondering is if we should really include this in the top level tune.run() API, or if this should be an option for the RayTrialExecutor only (which can be passed to tune.run()). The reason is that we try to prevent the tune.run() parameter list from growing too much, and technical parameters such as the result buffer length (especially when there's another way to set them, e.g. via environment variables) are prime candidates to exclude from the high level API.

Would you be happy with that as well?

Also cc @richardliaw would like to get your opinion here

@@ -175,6 +176,8 @@ def run(
``ray.tune.Stopper``, which allows users to implement
custom experiment-wide stopping (i.e., stopping an entire Tune
run based on some time constraint).
result_buffer_length (int): Maximum number of results to buffer.
If set, env var 'TUNE_RESULT_BUFFER_LENGTH' will be ignored.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If set, env var 'TUNE_RESULT_BUFFER_LENGTH' will be ignored.
If set, env var ``TUNE_RESULT_BUFFER_LENGTH`` will be ignored.

@llan-ml
Copy link
Contributor Author

llan-ml commented May 17, 2021

I think it's okay to only include this in RayTrialExecutor. In my case, I just want to be able to infer and set the value of buffer_length from other parameters such as validation period.

@krfricke
Copy link
Contributor

That sounds great. Would you be able to update the PR? I'm happy to approve afterwards and merge once CI passes

@llan-ml
Copy link
Contributor Author

llan-ml commented May 17, 2021

updated and rebased

Copy link
Contributor

@krfricke krfricke left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@krfricke krfricke merged commit 5d2ed47 into ray-project:master May 17, 2021
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