-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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] Clean up temporary checkpoint directories for class trainables (ex: RLlib) #44366
[tune] Clean up temporary checkpoint directories for class trainables (ex: RLlib) #44366
Conversation
Signed-off-by: Justin Yu <[email protected]>
# NOTE: There's no need to supply the checkpoint directory inside | ||
# the local trial dir, since it'll get persisted to the right location. | ||
@contextmanager | ||
def _create_checkpoint_dir(self, checkpoint_dir: Optional[str] = None): |
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.
Is this still used anywhere?
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.
Oh yeah I can delete this now.
…nup_cls_trainable_tmpdirs Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
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.
yay!
Why are these changes needed?
Class
Trainable
s currently create a temporary directory and provides it as the argument to the user-definedsave_checkpoint
. The temporary checkpoint directory gets persisted to storage after the user code executes, but it never gets cleaned up after. This leads to a build-up of many checkpoint "staging" folders that need to be manually deleted. RLlib is affected due toAlgorithm
s being class trainables.This PR cleans up the checkpoint folders right after they've been copied to storage.
Related issue number
Closes #43092
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.