-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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/rllib] Add checkpoint eraser #4490
Conversation
Can one of the admins verify this patch? |
Test PASSed. |
Test FAILed. |
Test FAILed. |
Test FAILed. |
Test FAILed. |
self.best_checkpoint_attr_value = -float("inf") \ | ||
if self._cmp_greater else float("inf") | ||
self.checkpoint_score_attr = checkpoint_score_attr \ | ||
if self._cmp_greater else checkpoint_score_attr[4:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could add a comment that this strips off the "min-" part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! One minor comment.
Test FAILed. |
Test FAILed. |
|
@ericl Updated! |
Test FAILed. |
@@ -495,6 +505,27 @@ def update_last_result(self, result, terminate=False): | |||
self.last_update_time = time.time() | |||
self.result_logger.on_result(self.last_result) | |||
|
|||
def compare_checkpoints(self, attr_mean): | |||
"""Compares two checkpoints based on the attribute attr_mean param. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to match the Google Style for docstrings? https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
jenkins retest this please |
Test PASSed. |
Test FAILed. |
jenkins retest this please Also some lint errors. |
Test FAILed. |
Tests look good, merging. Thanks! |
What do these changes do?
Adds checkpoint eraser so disk doesn't get filled up.
Arguments introduced are
--keep-checkpoints-num
- specifies up to how many checkpoints to keep--checkpoint-score-attr
- specifies by which parameter will the "best" checkpoints be ranked. (exampleepisode_reward_mean
). It can be specified with min- in front of the param name to rank by decreasing order (by default it is increasing examplemin-classification_loss
).Related issue number
#4381
#4287