Unverified Commit e1df77ee authored by Lucain's avatar Lucain Committed by GitHub
Browse files

Use HF_TOKEN env var in CI (#7993)

parent fdb1baa0
...@@ -39,7 +39,7 @@ jobs: ...@@ -39,7 +39,7 @@ jobs:
python utils/print_env.py python utils/print_env.py
- name: Diffusers Benchmarking - name: Diffusers Benchmarking
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.DIFFUSERS_BOT_TOKEN }} HF_TOKEN: ${{ secrets.DIFFUSERS_BOT_TOKEN }}
BASE_PATH: benchmark_outputs BASE_PATH: benchmark_outputs
run: | run: |
export TOTAL_GPU_MEMORY=$(python -c "import torch; print(torch.cuda.get_device_properties(0).total_memory / (1024**3))") export TOTAL_GPU_MEMORY=$(python -c "import torch; print(torch.cuda.get_device_properties(0).total_memory / (1024**3))")
......
...@@ -81,7 +81,7 @@ jobs: ...@@ -81,7 +81,7 @@ jobs:
- name: Nightly PyTorch CUDA checkpoint (pipelines) tests - name: Nightly PyTorch CUDA checkpoint (pipelines) tests
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8 CUBLAS_WORKSPACE_CONFIG: :16:8
run: | run: |
...@@ -141,7 +141,7 @@ jobs: ...@@ -141,7 +141,7 @@ jobs:
- name: Run nightly PyTorch CUDA tests for non-pipeline modules - name: Run nightly PyTorch CUDA tests for non-pipeline modules
if: ${{ matrix.module != 'examples'}} if: ${{ matrix.module != 'examples'}}
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8 CUBLAS_WORKSPACE_CONFIG: :16:8
run: | run: |
...@@ -154,7 +154,7 @@ jobs: ...@@ -154,7 +154,7 @@ jobs:
- name: Run nightly example tests with Torch - name: Run nightly example tests with Torch
if: ${{ matrix.module == 'examples' }} if: ${{ matrix.module == 'examples' }}
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8 CUBLAS_WORKSPACE_CONFIG: :16:8
run: | run: |
...@@ -211,7 +211,7 @@ jobs: ...@@ -211,7 +211,7 @@ jobs:
- name: Run nightly LoRA tests with PEFT and Torch - name: Run nightly LoRA tests with PEFT and Torch
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8 CUBLAS_WORKSPACE_CONFIG: :16:8
run: | run: |
...@@ -269,7 +269,7 @@ jobs: ...@@ -269,7 +269,7 @@ jobs:
- name: Run nightly Flax TPU tests - name: Run nightly Flax TPU tests
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
python -m pytest -n 0 \ python -m pytest -n 0 \
-s -v -k "Flax" \ -s -v -k "Flax" \
...@@ -324,7 +324,7 @@ jobs: ...@@ -324,7 +324,7 @@ jobs:
- name: Run nightly ONNXRuntime CUDA tests - name: Run nightly ONNXRuntime CUDA tests
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
-s -v -k "Onnx" \ -s -v -k "Onnx" \
...@@ -390,7 +390,7 @@ jobs: ...@@ -390,7 +390,7 @@ jobs:
shell: arch -arch arm64 bash {0} shell: arch -arch arm64 bash {0}
env: env:
HF_HOME: /System/Volumes/Data/mnt/cache HF_HOME: /System/Volumes/Data/mnt/cache
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \ ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
--report-log=tests_torch_mps.log \ --report-log=tests_torch_mps.log \
......
...@@ -87,7 +87,7 @@ jobs: ...@@ -87,7 +87,7 @@ jobs:
python utils/print_env.py python utils/print_env.py
- name: Slow PyTorch CUDA checkpoint tests on Ubuntu - name: Slow PyTorch CUDA checkpoint tests on Ubuntu
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8 CUBLAS_WORKSPACE_CONFIG: :16:8
run: | run: |
...@@ -144,7 +144,7 @@ jobs: ...@@ -144,7 +144,7 @@ jobs:
- name: Run slow PyTorch CUDA tests - name: Run slow PyTorch CUDA tests
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8 CUBLAS_WORKSPACE_CONFIG: :16:8
run: | run: |
...@@ -194,7 +194,7 @@ jobs: ...@@ -194,7 +194,7 @@ jobs:
- name: Run slow PEFT CUDA tests - name: Run slow PEFT CUDA tests
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8 CUBLAS_WORKSPACE_CONFIG: :16:8
run: | run: |
...@@ -243,7 +243,7 @@ jobs: ...@@ -243,7 +243,7 @@ jobs:
- name: Run slow Flax TPU tests - name: Run slow Flax TPU tests
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
python -m pytest -n 0 \ python -m pytest -n 0 \
-s -v -k "Flax" \ -s -v -k "Flax" \
...@@ -290,7 +290,7 @@ jobs: ...@@ -290,7 +290,7 @@ jobs:
- name: Run slow ONNXRuntime CUDA tests - name: Run slow ONNXRuntime CUDA tests
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
-s -v -k "Onnx" \ -s -v -k "Onnx" \
...@@ -337,7 +337,7 @@ jobs: ...@@ -337,7 +337,7 @@ jobs:
python utils/print_env.py python utils/print_env.py
- name: Run example tests on GPU - name: Run example tests on GPU
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "compile" --make-reports=tests_torch_compile_cuda tests/ python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "compile" --make-reports=tests_torch_compile_cuda tests/
- name: Failure short reports - name: Failure short reports
...@@ -378,7 +378,7 @@ jobs: ...@@ -378,7 +378,7 @@ jobs:
python utils/print_env.py python utils/print_env.py
- name: Run example tests on GPU - name: Run example tests on GPU
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "xformers" --make-reports=tests_torch_xformers_cuda tests/ python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "xformers" --make-reports=tests_torch_xformers_cuda tests/
- name: Failure short reports - name: Failure short reports
...@@ -423,7 +423,7 @@ jobs: ...@@ -423,7 +423,7 @@ jobs:
- name: Run example tests on GPU - name: Run example tests on GPU
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
python -m uv pip install timm python -m uv pip install timm
......
...@@ -59,7 +59,7 @@ jobs: ...@@ -59,7 +59,7 @@ jobs:
shell: arch -arch arm64 bash {0} shell: arch -arch arm64 bash {0}
env: env:
HF_HOME: /System/Volumes/Data/mnt/cache HF_HOME: /System/Volumes/Data/mnt/cache
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: | run: |
${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/ ${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/
......
...@@ -25,6 +25,6 @@ jobs: ...@@ -25,6 +25,6 @@ jobs:
- name: Update metadata - name: Update metadata
env: env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.SAYAK_HF_TOKEN }} HF_TOKEN: ${{ secrets.SAYAK_HF_TOKEN }}
run: | run: |
python utils/update_metadata.py --commit_sha ${{ github.sha }} python utils/update_metadata.py --commit_sha ${{ github.sha }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment