Skip to content

Commit ccf967f

Browse files
committed
Uninstall onnx beforehand, rather than afterwards.
Signed-off-by: Edward Z. Yang <[email protected]>
1 parent 7d05aa0 commit ccf967f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

jenkins/pytorch/build_nimbix.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ export CMAKE_PREFIX_PATH=$CONDA_ROOT_PREFIX
180180
echo "Python Version:"
181181
python --version
182182

183+
# Uninstall onnx and onnx-caffe2; if stale versions are left over,
184+
# we may spuriously run test/test_onnx.py when we don't want to
185+
pip uninstall -y onnx || true
186+
pip uninstall -y onnx-caffe2 || true
187+
183188
echo "Installing $PROJECT at branch $GIT_BRANCH and commit $GIT_COMMIT"
184189
rm -rf $PROJECT
185190
git clone https://github.com/pytorch/$PROJECT --quiet
@@ -220,8 +225,6 @@ if [ ! -z "$jenkins_nightly" ]; then
220225
(cd onnx-pytorch && python setup.py install)
221226
python onnx-pytorch/test/test_models.py
222227
python onnx-pytorch/test/test_caffe2.py
223-
pip uninstall -y onnx || true
224-
pip uninstall -y onnx-caffe2 || true
225228
fi
226229

227230
echo "Testing pytorch"

0 commit comments

Comments
 (0)