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

Install accelerete@main in PyTorch Past CI jobs. #22963

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Apr 24, 2023

What does this PR do?

Install accelerete@main in PyTorch Past CI jobs.

Context

In ##22393, we added back deepspeed in Past CI docker image. Later in #22859, we decide to use accelerate@main, but I forgot to apply the same change in Past CI docker file, as I mistakenly thought Past CI doesn't use accelerate.

  • However, [deepspeed-testing] (installed in Past CI docker) includes accelerate, and we want it to be accelerate@main.
  • We can't include acclerate it in the docker image, as for the TF Past CI, it will break something
    • there was a remark: accelerate requires torch, and this causes import issues for TF-only testing

@ydshieh ydshieh marked this pull request as ready for review April 24, 2023 15:10
if: inputs.framework == 'pytorch'
working-directory: /transformers
run: |
python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

need this to be installed in CI jobs, not in Past CI docker images. See PR description.

@@ -39,6 +38,10 @@ RUN $INSTALL_CMD

RUN [ "$FRAMEWORK" != "pytorch" ] && echo "`deepspeed-testing` installation is skipped" || python3 -m pip install --no-cache-dir ./transformers[deepspeed-testing]

# Remove `accelerate`: it requires `torch`, and this causes import issues for TF-only testing
# We will install `accelerate@main` in Past CI workflow file
RUN python3 -m pip uninstall -y accelerate
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Installed in Past CI PyTorch runs.

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!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 24, 2023

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

Copy link
Contributor

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Makes sense!

@ydshieh ydshieh merged commit 073baf7 into main Apr 24, 2023
3 checks passed
@ydshieh ydshieh deleted the use_nightly_accelerate_in_past_ci branch April 24, 2023 19:19
gojiteji pushed a commit to gojiteji/transformers that referenced this pull request Jun 5, 2023
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
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.

None yet

4 participants