Skip to content

Commit ff85043

Browse files
committed
Fix pytorch install
1 parent 0d6ed87 commit ff85043

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build-test-reusable.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ jobs:
128128
if: inputs.env_manager != 'base'
129129
run: |
130130
pip install torch --index-url https://download.pytorch.org/whl/nightly/xpu
131+
git clone --recursive https://github.com/pytorch/pytorch
132+
cd pytorch
133+
git checkout ${{ inputs.pytorch_ref }}
131134
132135
- name: Install pass_rate dependencies
133136
run: |
@@ -204,20 +207,21 @@ jobs:
204207
try-tag-prefix: v
205208

206209
- name: Install transformers
207-
if: inputs.env_manager != 'base'
210+
if: (inputs.env_manager != 'base') && (steps.conda-cache.outputs.status == 'miss')
208211
run: |
209212
git clone --recursive https://github.com/huggingface/transformers
210213
cd transformers
211214
git checkout ${{ env.TRANSFORMERS_VERSION }}
212215
python setup.py bdist_wheel
213216
pip install dist/*.whl
217+
python -c "import transformers; print(transformers.__version__)"
218+
pip install pyyaml pandas scipy numpy psutil pyre_extensions torchrec
214219
215220
- name: Run E2E test
216221
run: |
217222
# Set WORKSPACE for inductor_xpu_test.sh to make sure it creates "inductor_log" outside of pytorch cloned directory
218223
export WORKSPACE=$GITHUB_WORKSPACE
219224
cd pytorch
220-
pip install pyyaml pandas scipy numpy psutil pyre_extensions torchrec
221225
# TODO: Find the fastest Hugging Face model
222226
$GITHUB_WORKSPACE/scripts/inductor_xpu_test.sh huggingface float32 inference accuracy xpu 0 static 1 0 AlbertForMaskedLM
223227
# The script above always returns 0, so we need an additional check to see if the accuracy test passed

0 commit comments

Comments
 (0)