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

Create alias for Accelerator.free_memory #318

Merged
merged 3 commits into from
Apr 19, 2022
Merged

Create alias for Accelerator.free_memory #318

merged 3 commits into from
Apr 19, 2022

Conversation

muellerzr
Copy link
Collaborator

@muellerzr muellerzr commented Apr 19, 2022

Create alias for Accelerator.free_memory

What does this add?

This PR introduces Accelerator.clear, an alias for Accelerator.free_memory. The reasoning for this addition is a user may be wanting to destroy all of the stored items in Accelerate, and they may instinctively search for a "clear" function.

They may dig for a bit until they see that free_memory is what they should call, so this pr helps to aid that workflow style and expectation.

(This PR is 100% opinionated ;) )

@muellerzr muellerzr added the enhancement New feature or request label Apr 19, 2022
@muellerzr muellerzr requested a review from sgugger April 19, 2022 18:09
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 19, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants