From 7fadcad7cbf2cd5478c14a780c8360483d8493c5 Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Mon, 30 Nov 2020 11:02:11 -0800 Subject: [PATCH 1/9] FIX Fix EXITCODE override in test_notebooks script --- ci/gpu/test-notebooks.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/gpu/test-notebooks.sh b/ci/gpu/test-notebooks.sh index 2b8a470bde..e2593b0714 100755 --- a/ci/gpu/test-notebooks.sh +++ b/ci/gpu/test-notebooks.sh @@ -15,7 +15,7 @@ SKIPNBS="cuml_benchmarks.ipynb" ## Check env env -EXITCODE=0 +NOTEBOOKS_EXITCODE=0 # Always run nbtest in all TOPLEVEL_NB_FOLDERS, set EXITCODE to failure # if any run fails @@ -36,7 +36,7 @@ for nb in $(find . -name "*.ipynb"); do else nvidia-smi ${NBTEST} ${nbBasename} - EXITCODE=$((EXITCODE | $?)) + NOTEBOOKS_EXITCODE=$((NOTEBOOKS_EXITCODE | $?)) rm -rf ${LIBCUDF_KERNEL_CACHE_PATH}/* fi done @@ -44,4 +44,4 @@ done nvidia-smi -exit ${EXITCODE} +exit ${NOTEBOOKS_EXITCODE} From 4343f6fc7e2223ba7e2274d2329584afc90f64c5 Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Mon, 30 Nov 2020 11:05:37 -0800 Subject: [PATCH 2/9] DOC Changelog update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e2cf76aa7..21bb0dd04e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,7 @@ - PR #3162: Removing accidentally checked in debug file - PR #3175: Fix gtest pinned cmake version for build from source option - PR #3182: Fix a bug in MSE metric calculation +- PR #3208: Fix EXITCODE override in notebook test script # cuML 0.16.0 (23 Oct 2020) From 17203197237f3333aeffdc283052abf71f5adbde Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Mon, 30 Nov 2020 11:16:33 -0800 Subject: [PATCH 3/9] FIX Move bash trap to after the GTests so they fail immediately --- ci/gpu/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 1e6df17b6b..b27320ddf4 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -110,9 +110,6 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then ################################################################################ # TEST - Run GoogleTest and py.tests for libcuml and cuML ################################################################################ - set +e -Eo pipefail - EXITCODE=0 - trap "EXITCODE=1" ERR if hasArg --skip-tests; then gpuci_logger "Skipping Tests" @@ -139,6 +136,9 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then ################################################################################ # TEST - Run notebook tests ################################################################################ + set +e -Eo pipefail + EXITCODE=0 + trap "EXITCODE=1" ERR gpuci_logger "Notebook tests" ${WORKSPACE}/ci/gpu/test-notebooks.sh 2>&1 | tee nbtest.log From 5afb4f7653db53aa9adb86f1da9ccc29987f4916 Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Mon, 30 Nov 2020 13:25:13 -0800 Subject: [PATCH 4/9] FIX Move codecov block to gpu build --- ci/gpu/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index b27320ddf4..90326c7ed5 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -241,4 +241,8 @@ else fi +if [ -n "\${CODECOV_TOKEN}" ]; then + codecov -t \$CODECOV_TOKEN +fi + return ${EXITCODE} From bc5056ea65a8f606f68e3d9f1a773ad5ea578a5e Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Thu, 25 Mar 2021 08:07:07 -0700 Subject: [PATCH 5/9] ENH Add conda build dir --- ci/cpu/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index f762e5502f..3243965a22 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -19,6 +19,10 @@ export CUDA_REL=${CUDA_VERSION%.*} export GPUCI_CONDA_RETRY_MAX=1 export GPUCI_CONDA_RETRY_SLEEP=30 +# Use Ninja to build, setup Conda Build Dir +export CMAKE_GENERATOR="Ninja" +export CONDA_BLD_DIR="${WORKSPACE}/.conda-bld" + # Switch to project root; also root of repo checkout cd $WORKSPACE From d842d09d12af855436c58bfb16a171d94aa85698 Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Thu, 25 Mar 2021 08:15:40 -0700 Subject: [PATCH 6/9] ENH Change conda build dir for ccache integration --- ci/cpu/build.sh | 10 ++++++---- ci/cpu/upload.sh | 4 ++-- ci/gpu/build.sh | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 08e71c7353..19682f7578 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -62,22 +62,24 @@ conda config --set ssl_verify False if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then if [ "$BUILD_LIBCUML" == '1' -o "$BUILD_CUML" == '1' ]; then gpuci_logger "Build conda pkg for libcuml" - gpuci_conda_retry build conda/recipes/libcuml + gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuml fi else if [ "$BUILD_LIBCUML" == '1' ]; then gpuci_logger "PROJECT FLASH: Build conda pkg for libcuml" - gpuci_conda_retry build conda/recipes/libcuml --dirty --no-remove-work-dir + gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuml --dirty --no-remove-work-dir + mkdir -p ${CONDA_BLD_DIR}/libcuml/work + cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcuml/work fi fi if [ "$BUILD_CUML" == '1' ]; then if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then gpuci_logger "Build conda pkg for cuml" - gpuci_conda_retry build conda/recipes/cuml --python=${PYTHON} + gpuci_conda_retry build --croot ${CONDA_BLD_DIR} conda/recipes/cuml --python=${PYTHON} else gpuci_logger "PROJECT FLASH: Build conda pkg for cuml" - gpuci_conda_retry build -c ci/artifacts/cuml/cpu/conda-bld/ --dirty --no-remove-work-dir conda/recipes/cuml --python=${PYTHON} + gpuci_conda_retry build --croot ${CONDA_BLD_DIR} -c ci/artifacts/cuml/cpu/conda-bld/ --dirty --no-remove-work-dir conda/recipes/cuml --python=${PYTHON} fi fi diff --git a/ci/cpu/upload.sh b/ci/cpu/upload.sh index 586cabae55..862b2de435 100644 --- a/ci/cpu/upload.sh +++ b/ci/cpu/upload.sh @@ -29,8 +29,8 @@ fi gpuci_logger "Get conda file output locations" -export LIBCUML_FILE=`conda build conda/recipes/libcuml --output` -export CUML_FILE=`conda build conda/recipes/cuml --python=$PYTHON --output` +export LIBCUML_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuml --output` +export CUML_FILE=`conda build --croot ${CONDA_BLD_DIR} conda/recipes/cuml --python=$PYTHON --output` ################################################################################ # UPLOAD - Conda packages diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index c128e0f88c..7c1ac22f44 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -16,6 +16,7 @@ function hasArg { # Set path and build parallel level export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4} +export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/cugraph/cpu/.conda-bld/ # Set home to the job's workspace export HOME=$WORKSPACE @@ -185,11 +186,11 @@ else patchelf --replace-needed `patchelf --print-needed ./test/ml | grep faiss` libfaiss.so ./test/ml GTEST_OUTPUT="xml:${WORKSPACE}/test-results/libcuml_cpp/" ./test/ml - CONDA_FILE=`find $WORKSPACE/ci/artifacts/cuml/cpu/conda-bld/ -name "libcuml*.tar.bz2"` + CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "libcuml*.tar.bz2"` CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install gpuci_logger "Installing $CONDA_FILE" - conda install -c $WORKSPACE/ci/artifacts/cuml/cpu/conda-bld/ "$CONDA_FILE" + conda install -c ${CONDA_ARTIFACT_PATH} "$CONDA_FILE" gpuci_logger "Building cuml" "$WORKSPACE/build.sh" -v cuml --codecov From c32159fcfa4ab576e27fb8f67399b6f23714727c Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Thu, 25 Mar 2021 08:36:08 -0700 Subject: [PATCH 7/9] FIX Fix artifact folder --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 7c1ac22f44..7bdb944859 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -16,7 +16,7 @@ function hasArg { # Set path and build parallel level export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4} -export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/cugraph/cpu/.conda-bld/ +export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/cuml/cpu/.conda-bld/ # Set home to the job's workspace export HOME=$WORKSPACE From bd29f51f7c788dbc17213e8d2b2a1f1a5672b49d Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Thu, 25 Mar 2021 08:57:46 -0700 Subject: [PATCH 8/9] Add copyright header --- ci/cpu/upload.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/cpu/upload.sh b/ci/cpu/upload.sh index 862b2de435..e23298b4dd 100644 --- a/ci/cpu/upload.sh +++ b/ci/cpu/upload.sh @@ -1,6 +1,5 @@ #!/bin/bash -# -# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh +# Copyright (c) 2018-2021, NVIDIA CORPORATION. set -e From 704210fcb1ce7f1ed32679c2a65e78a65e3c51a9 Mon Sep 17 00:00:00 2001 From: dillon-cullinan Date: Thu, 25 Mar 2021 11:51:06 -0700 Subject: [PATCH 9/9] FIX Fix conda bld dir ref in python build --- ci/cpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 19682f7578..8f1d4c4b87 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -79,7 +79,7 @@ if [ "$BUILD_CUML" == '1' ]; then gpuci_conda_retry build --croot ${CONDA_BLD_DIR} conda/recipes/cuml --python=${PYTHON} else gpuci_logger "PROJECT FLASH: Build conda pkg for cuml" - gpuci_conda_retry build --croot ${CONDA_BLD_DIR} -c ci/artifacts/cuml/cpu/conda-bld/ --dirty --no-remove-work-dir conda/recipes/cuml --python=${PYTHON} + gpuci_conda_retry build --croot ${CONDA_BLD_DIR} -c ci/artifacts/cuml/cpu/.conda-bld/ --dirty --no-remove-work-dir conda/recipes/cuml --python=${PYTHON} fi fi