From 2bf50a70932f4825d3995b9cd942552dbfb2f4b6 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 11 Sep 2017 23:16:45 -0400 Subject: [PATCH 1/2] Activate root env explicitly, even for Python 3 builds. The benefit of doing it this way is that some more environment variables, e.g., CONDA_PREFIX, get set. It will turn out that this is important to get the onnx build to find protobuf. Signed-off-by: Edward Z. Yang --- jenkins/pytorch/build_nimbix.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jenkins/pytorch/build_nimbix.sh b/jenkins/pytorch/build_nimbix.sh index 6de61e98b..2ae9291c8 100644 --- a/jenkins/pytorch/build_nimbix.sh +++ b/jenkins/pytorch/build_nimbix.sh @@ -155,6 +155,8 @@ then fi source activate py2k export CONDA_ROOT_PREFIX="$HOME/miniconda/envs/py2k" +else + source activate root fi echo "Conda root: $CONDA_ROOT_PREFIX" From 43aebf6e2404d918f0aeb111840824205e7e49a0 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 11 Sep 2017 20:49:44 -0400 Subject: [PATCH 2/2] Tests for nightlies. If jenkins_nightly is set, we install some extra software from onnx-pytorch and run some extra tests to see if ONNX works. Signed-off-by: Edward Z. Yang --- jenkins/pytorch/build_nimbix.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/jenkins/pytorch/build_nimbix.sh b/jenkins/pytorch/build_nimbix.sh index 2ae9291c8..1933565fd 100644 --- a/jenkins/pytorch/build_nimbix.sh +++ b/jenkins/pytorch/build_nimbix.sh @@ -196,6 +196,31 @@ fi pip install -r requirements.txt || true time python setup.py install +if [ ! -z "$jenkins_nightly" ]; then + echo "Installing nightly dependencies" + conda install -y -c ezyang/label/gcc5 -c conda-forge protobuf scipy caffe2 + git clone https://github.com/onnx/onnx-caffe2.git --recurse-submodules --quiet + # There is some nuance to the strategy here. In principle, + # we could check out HEAD versions of *all* our dependencies + # and see if the whole shebang builds. But if the build breaks, + # it is not obvious who is to blame. A breakage here is + # not *actionable*, which means it is not useful. + # + # So, our strategy is to checkout HEAD of onnx-pytorch (which + # is supposed to be passing CI), and update only *pytorch* + # to HEAD. + # + # BTW, this means that this is likely to fail of onnx-pytorch + # is floating some temporary patches that haven't made their + # way back to PyTorch. This is by design: merge those patches! + echo "Installing onnx-pytorch" + git clone https://github.com/ezyang/onnx-pytorch.git --recurse-submodules --quiet + (cd onnx-pytorch/onnx && python setup.py install) + (cd onnx-pytorch/onnx-caffe2 && python setup.py install) + python onnx-pytorch/test/test_models.py + python onnx-pytorch/test/test_caffe2.py +fi + echo "Testing pytorch" export OMP_NUM_THREADS=4 export MKL_NUM_THREADS=4