-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[tune] Avoid scheduler blocking, add reuse_actors optimization #4218
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b7331f2
fpbt
ericl 7369fb6
add runner caching
ericl f64328e
reset config
ericl b2d825b
make it optional
ericl 5b50218
trial doc
ericl c56c9cd
Merge remote-tracking branch 'upstream/master' into faster-pbt
ericl 7665d88
add test
ericl fd115b0
fix
ericl 1ba7336
don't reuse on trial start
ericl 9a9221f
fix tests
ericl 6cb0dc9
forgot to restore weights
ericl 566d8c2
Merge branch 'master' into faster-pbt
ericl 3327e3a
Update error.py
ericl d3146cd
Merge remote-tracking branch 'upstream/master' into faster-pbt
ericl 1ba204a
merge
ericl c1015fa
Merge branch 'faster-pbt' of github.com:ericl/ray into faster-pbt
ericl 1ce6f74
run reuse in jenkins only
ericl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -218,23 +218,29 @@ def _exploit(self, trial_executor, trial, trial_to_clone): | |
| trial_state = self._trial_state[trial] | ||
| new_state = self._trial_state[trial_to_clone] | ||
| if not new_state.last_checkpoint: | ||
| logger.warning("[pbt]: no checkpoint for trial." | ||
| " Skip exploit for Trial {}".format(trial)) | ||
| logger.info("[pbt]: no checkpoint for trial." | ||
| " Skip exploit for Trial {}".format(trial)) | ||
| return | ||
| new_config = explore(trial_to_clone.config, self._hyperparam_mutations, | ||
| self._resample_probability, | ||
| self._custom_explore_fn) | ||
| logger.warning("[exploit] transferring weights from trial " | ||
| "{} (score {}) -> {} (score {})".format( | ||
| trial_to_clone, new_state.last_score, trial, | ||
| trial_state.last_score)) | ||
| logger.info("[exploit] transferring weights from trial " | ||
| "{} (score {}) -> {} (score {})".format( | ||
| trial_to_clone, new_state.last_score, trial, | ||
| trial_state.last_score)) | ||
| # TODO(ekl) restarting the trial is expensive. We should implement a | ||
| # lighter way reset() method that can alter the trial config. | ||
| new_tag = make_experiment_tag(trial_state.orig_tag, new_config, | ||
| self._hyperparam_mutations) | ||
| reset_successful = trial_executor.reset_trial(trial, new_config, | ||
| new_tag) | ||
| if not reset_successful: | ||
| if reset_successful: | ||
| trial_executor.restore( | ||
| trial, Checkpoint.from_object(new_state.last_checkpoint)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @arcelien is this ok?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me try it on a single gpu machine both with time mutliplexing and also with a small population size. |
||
| else: | ||
| logger.warning( | ||
| "Your Trainable does not support reset_config(); falling " | ||
| "back to slower path of stopping and restarting trial.") | ||
| trial_executor.stop_trial(trial, stop_logger=False) | ||
| trial.config = new_config | ||
| trial.experiment_tag = new_tag | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.