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

deprecate no_cuda #24863

Merged
merged 6 commits into from
Jul 17, 2023
Merged

deprecate no_cuda #24863

merged 6 commits into from
Jul 17, 2023

Conversation

SunMarc
Copy link
Member

@SunMarc SunMarc commented Jul 17, 2023

What does this PR do?

This PR deprecates the no_cuda arg because it is confusing for Mac users as their models get dispatched to mps device when no_cuda=False. If they want to train the model on cpu, they need to set no_cuda=True which is not intuitive. We rename it use_cpu instead.

Related issue #24697

@SunMarc SunMarc requested a review from sgugger July 17, 2023 17:13
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.

Thanks for adding this! Just one comment on the docstring.

Please hold off merging until the release branch has been cut.

src/transformers/training_args.py Outdated Show resolved Hide resolved
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.

Perfect!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 17, 2023

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

@SunMarc SunMarc merged commit 9dc965b into huggingface:main Jul 17, 2023
@SunMarc SunMarc deleted the deprecate_no_cuda branch July 17, 2023 18:52
@SunMarc SunMarc restored the deprecate_no_cuda branch July 17, 2023 22:36
blbadger pushed a commit to blbadger/transformers that referenced this pull request Nov 8, 2023
* deprecate no_cuda

* style

* remove doc

* remove doc 2

* fix style
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.

3 participants