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] Have one canonical way of stopping trial. #21021

Merged
merged 5 commits into from
Dec 25, 2021

Conversation

xwjiang2010
Copy link
Contributor

@xwjiang2010 xwjiang2010 commented Dec 10, 2021

Why are these changes needed?

Try to materialize some of the low hanging fruits during scheduler investigation.

This PR is introducing a canonical impl for stopping trials by collecting scattered logic from process_trial_result back into stop_trial. This way, we know what is expected (e.g. what callbacks are invoked and when they are invoked).
This PR will correct the current wrong logic that on_trial_complete callback is invoked before on_trial_checkpoint, which is the source of Syncer clean up issues.

Related issue number

#17506

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

@xwjiang2010 xwjiang2010 added this to the Tune Tech Debt Reduction milestone Dec 10, 2021
@xwjiang2010 xwjiang2010 added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Dec 14, 2021
python/ray/tune/trial_runner.py Show resolved Hide resolved
python/ray/tune/trial_runner.py Outdated Show resolved Hide resolved
@krfricke krfricke merged commit 0b9cdb1 into ray-project:master Dec 25, 2021
@xwjiang2010 xwjiang2010 deleted the stop_trial branch July 26, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests-ok The tagger certifies test failures are unrelated and assumes personal liability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants