mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 10:12:23 +06:00
Install accelerete@main
in PyTorch Past CI jobs (#22963)
fix Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
e4a97f82bf
commit
073baf7f22
17
.github/workflows/self-past.yml
vendored
17
.github/workflows/self-past.yml
vendored
@ -126,6 +126,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
nvidia-smi
|
nvidia-smi
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
if: inputs.framework == 'pytorch'
|
||||||
|
working-directory: /transformers
|
||||||
|
run: |
|
||||||
|
python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
|
||||||
|
|
||||||
- name: Environment
|
- name: Environment
|
||||||
working-directory: /transformers
|
working-directory: /transformers
|
||||||
run: |
|
run: |
|
||||||
@ -192,6 +198,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
nvidia-smi
|
nvidia-smi
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
if: inputs.framework == 'pytorch'
|
||||||
|
working-directory: /transformers
|
||||||
|
run: |
|
||||||
|
python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
|
||||||
|
|
||||||
- name: Environment
|
- name: Environment
|
||||||
working-directory: /transformers
|
working-directory: /transformers
|
||||||
run: |
|
run: |
|
||||||
@ -243,6 +255,11 @@ jobs:
|
|||||||
working-directory: /transformers
|
working-directory: /transformers
|
||||||
run: git fetch && git checkout ${{ github.sha }}
|
run: git fetch && git checkout ${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
working-directory: /transformers
|
||||||
|
run: |
|
||||||
|
python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
|
||||||
|
|
||||||
- name: Remove cached torch extensions
|
- name: Remove cached torch extensions
|
||||||
run: rm -rf /github/home/.cache/torch_extensions/
|
run: rm -rf /github/home/.cache/torch_extensions/
|
||||||
|
|
||||||
|
@ -27,8 +27,7 @@ ARG VERSION
|
|||||||
RUN [ "$VERSION" != "1.9" -a "$VERSION" != "1.10" ] && python3 -m pip install -U setuptools || python3 -m pip install -U "setuptools<=59.5"
|
RUN [ "$VERSION" != "1.9" -a "$VERSION" != "1.10" ] && python3 -m pip install -U setuptools || python3 -m pip install -U "setuptools<=59.5"
|
||||||
|
|
||||||
# Remove all frameworks
|
# Remove all frameworks
|
||||||
# (`accelerate` requires `torch`, and this causes import issues for TF-only testing)
|
RUN python3 -m pip uninstall -y torch torchvision torchaudio tensorflow jax flax
|
||||||
RUN python3 -m pip uninstall -y torch torchvision torchaudio accelerate tensorflow jax flax
|
|
||||||
|
|
||||||
# Get the libraries and their versions to install, and write installation command to `~/.profile`.
|
# Get the libraries and their versions to install, and write installation command to `~/.profile`.
|
||||||
RUN python3 ./transformers/utils/past_ci_versions.py --framework $FRAMEWORK --version $VERSION
|
RUN python3 ./transformers/utils/past_ci_versions.py --framework $FRAMEWORK --version $VERSION
|
||||||
@ -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]
|
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
|
||||||
|
|
||||||
# Uninstall `torch-tensorrt` and `apex` shipped with the base image
|
# Uninstall `torch-tensorrt` and `apex` shipped with the base image
|
||||||
RUN python3 -m pip uninstall -y torch-tensorrt apex
|
RUN python3 -m pip uninstall -y torch-tensorrt apex
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user