Skip to content

Release GPU memory after Optuna trial#35440

Merged
ArthurZucker merged 4 commits into
huggingface:mainfrom
JanetVictorious:feature/memory-release-for-hpo-optuna
Jan 7, 2025
Merged

Release GPU memory after Optuna trial#35440
ArthurZucker merged 4 commits into
huggingface:mainfrom
JanetVictorious:feature/memory-release-for-hpo-optuna

Conversation

@JanetVictorious

@JanetVictorious JanetVictorious commented Dec 28, 2024

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR aims at releasing GPU memory after an Optuna trial when running hyperparameter_search.

Fixes #13019

Solution has been tested locally.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@amyeroberts @SunMarc

@SunMarc SunMarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM ! Left a suggestion

Comment thread src/transformers/integrations/integration_utils.py
@SunMarc
SunMarc requested a review from ArthurZucker December 30, 2024 15:01
@JanetVictorious

Copy link
Copy Markdown
Contributor Author

@ArthurZucker do you have any comments on this change?

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, sorry for the delay, we are all getting back from vacations!

@ArthurZucker
ArthurZucker merged commit 628cd83 into huggingface:main Jan 7, 2025
@JanetVictorious
JanetVictorious deleted the feature/memory-release-for-hpo-optuna branch January 7, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPU Out of Memory when repeatedly running large models (hyperparameter_search)

3 participants