Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 970585e

Browse files
authored
Merge pull request #7 from ezyang/pr/nightlies
Logic for nightly builds with ONNX tests
2 parents 737bc65 + 43aebf6 commit 970585e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

jenkins/pytorch/build_nimbix.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ then
155155
fi
156156
source activate py2k
157157
export CONDA_ROOT_PREFIX="$HOME/miniconda/envs/py2k"
158+
else
159+
source activate root
158160
fi
159161

160162
echo "Conda root: $CONDA_ROOT_PREFIX"
@@ -194,6 +196,31 @@ fi
194196
pip install -r requirements.txt || true
195197
time python setup.py install
196198

199+
if [ ! -z "$jenkins_nightly" ]; then
200+
echo "Installing nightly dependencies"
201+
conda install -y -c ezyang/label/gcc5 -c conda-forge protobuf scipy caffe2
202+
git clone https://github.com/onnx/onnx-caffe2.git --recurse-submodules --quiet
203+
# There is some nuance to the strategy here. In principle,
204+
# we could check out HEAD versions of *all* our dependencies
205+
# and see if the whole shebang builds. But if the build breaks,
206+
# it is not obvious who is to blame. A breakage here is
207+
# not *actionable*, which means it is not useful.
208+
#
209+
# So, our strategy is to checkout HEAD of onnx-pytorch (which
210+
# is supposed to be passing CI), and update only *pytorch*
211+
# to HEAD.
212+
#
213+
# BTW, this means that this is likely to fail of onnx-pytorch
214+
# is floating some temporary patches that haven't made their
215+
# way back to PyTorch. This is by design: merge those patches!
216+
echo "Installing onnx-pytorch"
217+
git clone https://github.com/ezyang/onnx-pytorch.git --recurse-submodules --quiet
218+
(cd onnx-pytorch/onnx && python setup.py install)
219+
(cd onnx-pytorch/onnx-caffe2 && python setup.py install)
220+
python onnx-pytorch/test/test_models.py
221+
python onnx-pytorch/test/test_caffe2.py
222+
fi
223+
197224
echo "Testing pytorch"
198225
export OMP_NUM_THREADS=4
199226
export MKL_NUM_THREADS=4

0 commit comments

Comments
 (0)