Skip to content

Commit a83428d

Browse files
committed
revert pr_tests.yml changes
1 parent 4ab04bc commit a83428d

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/pr_tests.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: Fast tests for PRs
23

34
on:
@@ -114,17 +115,20 @@ jobs:
114115

115116
- name: Install dependencies
116117
run: |
117-
uv pip install -e [quality]
118-
pip uninstall transformers -y && pip uninstall huggingface_hub -y && uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
119-
pip uninstall accelerate -y && uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
118+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
119+
python -m uv pip install -e [quality,test]
120+
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
121+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
120122
121123
- name: Environment
122124
run: |
125+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
123126
python utils/print_env.py
124127
125128
- name: Run fast PyTorch Pipeline CPU tests
126129
if: ${{ matrix.config.framework == 'pytorch_pipelines' }}
127130
run: |
131+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
128132
python -m pytest -n 8 --max-worker-restart=0 --dist=loadfile \
129133
-s -v -k "not Flax and not Onnx" \
130134
--make-reports=tests_${{ matrix.config.report }} \
@@ -133,6 +137,7 @@ jobs:
133137
- name: Run fast PyTorch Model Scheduler CPU tests
134138
if: ${{ matrix.config.framework == 'pytorch_models' }}
135139
run: |
140+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
136141
python -m pytest -n 4 --max-worker-restart=0 --dist=loadfile \
137142
-s -v -k "not Flax and not Onnx and not Dependency" \
138143
--make-reports=tests_${{ matrix.config.report }} \
@@ -141,6 +146,7 @@ jobs:
141146
- name: Run example PyTorch CPU tests
142147
if: ${{ matrix.config.framework == 'pytorch_examples' }}
143148
run: |
149+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
144150
python -m uv pip install peft timm
145151
python -m pytest -n 4 --max-worker-restart=0 --dist=loadfile \
146152
--make-reports=tests_${{ matrix.config.report }} \
@@ -190,15 +196,18 @@ jobs:
190196

191197
- name: Install dependencies
192198
run: |
193-
python -m uv pip install -e [quality]
199+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
200+
python -m uv pip install -e [quality,test]
194201
195202
- name: Environment
196203
run: |
204+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
197205
python utils/print_env.py
198206
199207
- name: Run Hub tests for models, schedulers, and pipelines on a staging env
200208
if: ${{ matrix.config.framework == 'hub_tests_pytorch' }}
201209
run: |
210+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
202211
HUGGINGFACE_CO_STAGING=true python -m pytest \
203212
-m "is_staging_test" \
204213
--make-reports=tests_${{ matrix.config.report }} \
@@ -241,18 +250,22 @@ jobs:
241250

242251
- name: Install dependencies
243252
run: |
244-
python -m uv pip install -e [quality]
253+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
254+
python -m uv pip install -e [quality,test]
245255
# TODO (sayakpaul, DN6): revisit `--no-deps`
246256
python -m pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
257+
python -m uv pip install -U tokenizers
247258
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
248259
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
249260
250261
- name: Environment
251262
run: |
263+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
252264
python utils/print_env.py
253265
254266
- name: Run fast PyTorch LoRA tests with PEFT
255267
run: |
268+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
256269
python -m pytest -n 4 --max-worker-restart=0 --dist=loadfile \
257270
-s -v \
258271
--make-reports=tests_peft_main \
@@ -274,4 +287,3 @@ jobs:
274287
with:
275288
name: pr_main_test_reports
276289
path: reports
277-

0 commit comments

Comments
 (0)