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

Fix notebook_launcher #1141

Merged
merged 4 commits into from
Mar 2, 2023
Merged

Fix notebook_launcher #1141

merged 4 commits into from
Mar 2, 2023

Conversation

muellerzr
Copy link
Collaborator

@muellerzr muellerzr commented Mar 2, 2023

The decorators in the Accelerator object still were initialing the Accelerator on import, leading to issues when using the notebook_launcher (as seen in #1119). This PR fixes #1119 by rewriting the decorators again to follow the _inner pattern. Note that this is only needed on the Accelerator, for the self-decorators. This isn't needed for the PartialState elsewhere.

(And this problem is mostly apparent on notebook_launcher, which takes a fork of the current process)

@muellerzr muellerzr added the bug Something isn't working label Mar 2, 2023
@muellerzr muellerzr requested a review from sgugger March 2, 2023 16:16
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 2, 2023

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.

Thanks for the fix!

@muellerzr muellerzr merged commit ad9cf78 into main Mar 2, 2023
@muellerzr muellerzr deleted the fix-tpu-launcher branch March 2, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TPU cannot be ran in Colab anymore
3 participants