Skip to content

Commit d2108b8

Browse files
committed
unify how adhoc installs are done in CI.
1 parent f20b83a commit d2108b8

File tree

4 files changed

+46
-20
lines changed

4 files changed

+46
-20
lines changed

.github/workflows/nightly_tests.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ jobs:
7373
run: |
7474
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
7575
python -m uv pip install -e [quality,test]
76-
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
77-
python -m uv pip install pytest-reportlog
76+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
77+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
78+
7879
- name: Environment
7980
run: |
8081
python utils/print_env.py
@@ -128,7 +129,8 @@ jobs:
128129
python -m uv pip install -e [quality,test]
129130
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
130131
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
131-
python -m uv pip install pytest-reportlog
132+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git
133+
132134
- name: Environment
133135
run: python utils/print_env.py
134136

@@ -152,6 +154,7 @@ jobs:
152154
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
153155
CUBLAS_WORKSPACE_CONFIG: :16:8
154156
run: |
157+
python -m uv pip install timm
155158
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
156159
-s -v --make-reports=examples_torch_cuda \
157160
--report-log=examples_torch_cuda.log \
@@ -192,7 +195,10 @@ jobs:
192195
- name: Install dependencies
193196
run: |
194197
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
195-
python -m uv pip install -e [quality,test,training]
198+
python -m uv pip install -e [quality,test]
199+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
200+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git
201+
python -m uv pip install -U peft@git+https://github.com/huggingface/peft.git
196202
- name: Environment
197203
run: |
198204
python utils/print_env.py
@@ -236,7 +242,8 @@ jobs:
236242
python -m uv pip install -e [quality,test]
237243
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
238244
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
239-
python -m uv pip install pytest-reportlog
245+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git
246+
240247
- name: Environment
241248
run: |
242249
python utils/print_env.py
@@ -285,6 +292,7 @@ jobs:
285292
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
286293
python -m uv pip install -e [quality,test]
287294
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
295+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git
288296
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
289297
290298
- name: Environment
@@ -343,7 +351,7 @@ jobs:
343351
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
344352
python -m uv pip install -e [quality,test]
345353
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
346-
python -m uv pip install pytest-reportlog
354+
347355
- name: Environment
348356
run: python utils/print_env.py
349357

@@ -405,11 +413,13 @@ jobs:
405413
run: |
406414
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
407415
python -m uv pip install -e [quality,test]
416+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git
417+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
408418
python -m uv pip install -U ${{ matrix.config.backend }}
409419
if [ "${{ join(matrix.config.additional_deps, ' ') }}" != "" ]; then
410420
python -m uv pip install ${{ join(matrix.config.additional_deps, ' ') }}
411421
fi
412-
python -m uv pip install pytest-reportlog
422+
413423
- name: Environment
414424
run: |
415425
python utils/print_env.py
@@ -457,8 +467,10 @@ jobs:
457467
run: |
458468
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
459469
python -m uv pip install -e [quality,test]
470+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git
471+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
460472
python -m uv pip install -U bitsandbytes optimum_quanto
461-
python -m uv pip install pytest-reportlog
473+
462474
- name: Environment
463475
run: |
464476
python utils/print_env.py
@@ -508,7 +520,7 @@ jobs:
508520
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
509521
python -m uv pip install -e [quality,test]
510522
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
511-
python -m uv pip install pytest-reportlog
523+
512524
513525
- name: Environment
514526
run: python utils/print_env.py
@@ -624,7 +636,7 @@ jobs:
624636
# ${CONDA_RUN} python -m uv pip install -e [quality,test]
625637
# ${CONDA_RUN} python -m uv pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
626638
# ${CONDA_RUN} python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate
627-
# ${CONDA_RUN} python -m uv pip install pytest-reportlog
639+
# ${CONDA_RUN}
628640
# - name: Environment
629641
# shell: arch -arch arm64 bash {0}
630642
# run: |
@@ -680,7 +692,7 @@ jobs:
680692
# ${CONDA_RUN} python -m uv pip install -e [quality,test]
681693
# ${CONDA_RUN} python -m uv pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
682694
# ${CONDA_RUN} python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate
683-
# ${CONDA_RUN} python -m uv pip install pytest-reportlog
695+
# ${CONDA_RUN}
684696
# - name: Environment
685697
# shell: arch -arch arm64 bash {0}
686698
# run: |

.github/workflows/pr_tests_gpu.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
run: |
132132
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
133133
python -m uv pip install -e [quality,test]
134-
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
134+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
135135
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
136136
137137
- name: Environment
@@ -201,8 +201,8 @@ jobs:
201201
run: |
202202
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
203203
python -m uv pip install -e [quality,test]
204-
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
205-
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
204+
python -m uv pip install peft@git+https://github.com/huggingface/peft.git --no-deps
205+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
206206
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
207207
208208
- name: Environment
@@ -265,8 +265,11 @@ jobs:
265265
- name: Install dependencies
266266
run: |
267267
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
268-
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
269268
python -m uv pip install -e [quality,test,training]
269+
pip uninstall peft -y && python -m uv pip install peft@git+https://github.com/huggingface/peft.git --no-deps
270+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
271+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
272+
python -m uv pip install timm
270273
271274
- name: Environment
272275
run: |
@@ -278,7 +281,6 @@ jobs:
278281
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
279282
run: |
280283
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
281-
python -m uv pip install timm
282284
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v --make-reports=examples_torch_cuda examples/
283285
284286
- name: Failure short reports

.github/workflows/push_tests.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ jobs:
7777
run: |
7878
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
7979
python -m uv pip install -e [quality,test]
80-
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
80+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
81+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
8182
- name: Environment
8283
run: |
8384
python utils/print_env.py
@@ -128,8 +129,9 @@ jobs:
128129
run: |
129130
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
130131
python -m uv pip install -e [quality,test]
131-
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
132-
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
132+
python -m uv pip install peft@git+https://github.com/huggingface/peft.git --no-deps
133+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
134+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
133135
134136
- name: Environment
135137
run: |
@@ -278,6 +280,10 @@ jobs:
278280
run: |
279281
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
280282
python -m uv pip install -e [quality,test,training]
283+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
284+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
285+
pip uninstall peft -y && python -m uv pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
286+
281287
- name: Environment
282288
run: |
283289
python utils/print_env.py
@@ -321,6 +327,8 @@ jobs:
321327
run: |
322328
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
323329
python -m uv pip install -e [quality,test,training]
330+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
331+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
324332
- name: Environment
325333
run: |
326334
python utils/print_env.py
@@ -362,6 +370,10 @@ jobs:
362370
run: |
363371
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
364372
python -m uv pip install -e [quality,test,training]
373+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
374+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
375+
pip uninstall peft -y && python -m uv pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
376+
python -m uv pip install timm
365377
366378
- name: Environment
367379
run: |
@@ -373,7 +385,6 @@ jobs:
373385
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
374386
run: |
375387
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
376-
python -m uv pip install timm
377388
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v --make-reports=examples_torch_cuda examples/
378389
379390
- name: Failure short reports

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ def run(self):
229229
"pytest",
230230
"pytest-timeout",
231231
"pytest-xdist",
232+
"pytest-reportlog",
232233
"requests-mock",
233234
"safetensors",
234235
"sentencepiece",

0 commit comments

Comments
 (0)