From deb62c855979a65357382a2838e25f1cb6d8b924 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Thu, 13 Jan 2022 17:01:39 +0000 Subject: [PATCH 1/8] Upgrade Treelite to 2.2.0 --- ci/gpu/build.sh | 5 +++++ conda/environments/cuml_dev_cuda11.0.yml | 2 +- conda/environments/cuml_dev_cuda11.2.yml | 2 +- conda/environments/cuml_dev_cuda11.4.yml | 2 +- conda/environments/cuml_dev_cuda11.5.yml | 2 +- conda/recipes/cuml/meta.yaml | 4 ++-- conda/recipes/libcuml/meta.yaml | 4 ++-- cpp/cmake/thirdparty/get_treelite.cmake | 4 ++-- 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 5433540c8f..665df8858d 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -64,6 +64,11 @@ gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvid "rapids-doc-env=${MINOR_VERSION}.*" \ "shap>=0.37,<=0.39" +gpuci_mamba_retry remove -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ + --force rapids-build-env rapids-notebook-env +gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ + treelite=2.2.0 + # https://docs.rapids.ai/maintainers/depmgmt/ # gpuci_mamba_retry remove --force rapids-build-env rapids-notebook-env # gpuci_mamba_retry install -y "your-pkg=1.0.0" diff --git a/conda/environments/cuml_dev_cuda11.0.yml b/conda/environments/cuml_dev_cuda11.0.yml index 4d95fc19b7..d7cc149b48 100644 --- a/conda/environments/cuml_dev_cuda11.0.yml +++ b/conda/environments/cuml_dev_cuda11.0.yml @@ -22,7 +22,7 @@ dependencies: - faiss-proc=*=cuda - umap-learn - scikit-learn=0.24 -- treelite=2.1.0 +- treelite=2.2.0 - statsmodels - seaborn - hdbscan diff --git a/conda/environments/cuml_dev_cuda11.2.yml b/conda/environments/cuml_dev_cuda11.2.yml index e4eb35c3e9..88e2c4bb4c 100644 --- a/conda/environments/cuml_dev_cuda11.2.yml +++ b/conda/environments/cuml_dev_cuda11.2.yml @@ -22,7 +22,7 @@ dependencies: - faiss-proc=*=cuda - umap-learn - scikit-learn=0.24 -- treelite=2.1.0 +- treelite=2.2.0 - statsmodels - seaborn - hdbscan diff --git a/conda/environments/cuml_dev_cuda11.4.yml b/conda/environments/cuml_dev_cuda11.4.yml index ca3d583333..3ce1924b4b 100644 --- a/conda/environments/cuml_dev_cuda11.4.yml +++ b/conda/environments/cuml_dev_cuda11.4.yml @@ -22,7 +22,7 @@ dependencies: - faiss-proc=*=cuda - umap-learn - scikit-learn=0.24 -- treelite=2.1.0 +- treelite=2.2.0 - statsmodels - seaborn - hdbscan diff --git a/conda/environments/cuml_dev_cuda11.5.yml b/conda/environments/cuml_dev_cuda11.5.yml index b9d5e9481f..7d524d9c5d 100644 --- a/conda/environments/cuml_dev_cuda11.5.yml +++ b/conda/environments/cuml_dev_cuda11.5.yml @@ -22,7 +22,7 @@ dependencies: - faiss-proc=*=cuda - umap-learn - scikit-learn=0.24 -- treelite=2.1.0 +- treelite=2.2.0 - statsmodels - seaborn - hdbscan diff --git a/conda/recipes/cuml/meta.yaml b/conda/recipes/cuml/meta.yaml index 3d10993733..c56f31005f 100644 --- a/conda/recipes/cuml/meta.yaml +++ b/conda/recipes/cuml/meta.yaml @@ -30,7 +30,7 @@ requirements: - setuptools - cython>=0.29,<0.30 - cmake>=3.20.1 - - treelite=2.1.0 + - treelite=2.2.0 - cudf {{ minor_version }} - libcuml={{ version }} - libcumlprims {{ minor_version }} @@ -44,7 +44,7 @@ requirements: - libcuml={{ version }} - libcumlprims {{ minor_version }} - cupy>=7.8.0,<10.0.0a0 - - treelite=2.1.0 + - treelite=2.2.0 - nccl>=2.9.9 - ucx-py {{ ucx_py_version }} - ucx-proc=*=gpu diff --git a/conda/recipes/libcuml/meta.yaml b/conda/recipes/libcuml/meta.yaml index db323560fe..e1814d1237 100644 --- a/conda/recipes/libcuml/meta.yaml +++ b/conda/recipes/libcuml/meta.yaml @@ -43,7 +43,7 @@ requirements: - ucx-proc=*=gpu - libcumlprims {{ minor_version }} - lapack - - treelite=2.1.0 + - treelite=2.2.0 - faiss-proc=*=cuda - gtest=1.10.0 - gmock @@ -55,7 +55,7 @@ requirements: - ucx-py {{ ucx_py_version }} - ucx-proc=*=gpu - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} - - treelite=2.1.0 + - treelite=2.2.0 - faiss-proc=*=cuda - libfaiss 1.7.0 *_cuda - libcusolver>=11.2.1 diff --git a/cpp/cmake/thirdparty/get_treelite.cmake b/cpp/cmake/thirdparty/get_treelite.cmake index 171706ea20..479e95936e 100644 --- a/cpp/cmake/thirdparty/get_treelite.cmake +++ b/cpp/cmake/thirdparty/get_treelite.cmake @@ -54,5 +54,5 @@ function(find_and_configure_treelite) endfunction() -find_and_configure_treelite(VERSION 2.1.0 - PINNED_TAG e5248931c62e3807248e0b150e27b2530a510634) +find_and_configure_treelite(VERSION 2.2.0 + PINNED_TAG 2a62c6f569a6b12520cbfc35b4a727bb6bb671b1) From 95869d743823266dfcbf9bde4a8a4365fdbcd934 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Thu, 13 Jan 2022 20:26:42 +0000 Subject: [PATCH 2/8] Update copyright years --- conda/recipes/libcuml/meta.yaml | 2 +- cpp/cmake/thirdparty/get_treelite.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/recipes/libcuml/meta.yaml b/conda/recipes/libcuml/meta.yaml index e1814d1237..05877c35e9 100644 --- a/conda/recipes/libcuml/meta.yaml +++ b/conda/recipes/libcuml/meta.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2021, NVIDIA CORPORATION. +# Copyright (c) 2018-2022, NVIDIA CORPORATION. # Usage: # conda build . -c conda-forge -c nvidia -c rapidsai -c pytorch diff --git a/cpp/cmake/thirdparty/get_treelite.cmake b/cpp/cmake/thirdparty/get_treelite.cmake index 479e95936e..bcbf65aa6b 100644 --- a/cpp/cmake/thirdparty/get_treelite.cmake +++ b/cpp/cmake/thirdparty/get_treelite.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2022, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From a6d721565bf27078772f136c0a380bb45b25a952 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Thu, 13 Jan 2022 17:59:19 -0800 Subject: [PATCH 3/8] Use gpuci_conda_retry to remove metapackages --- 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 665df8858d..98fc750253 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -64,7 +64,7 @@ gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvid "rapids-doc-env=${MINOR_VERSION}.*" \ "shap>=0.37,<=0.39" -gpuci_mamba_retry remove -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ +gpuci_conda_retry remove -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ --force rapids-build-env rapids-notebook-env gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ treelite=2.2.0 From 39a75a6fe390a27d26ba03f84d2d924e80dd57a7 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Fri, 14 Jan 2022 04:42:54 +0000 Subject: [PATCH 4/8] Relax almost_equal test in TreeExplainer test --- python/cuml/test/explainer/test_gpu_treeshap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/cuml/test/explainer/test_gpu_treeshap.py b/python/cuml/test/explainer/test_gpu_treeshap.py index fcaa19d6ca..e6161f2974 100644 --- a/python/cuml/test/explainer/test_gpu_treeshap.py +++ b/python/cuml/test/explainer/test_gpu_treeshap.py @@ -59,9 +59,9 @@ def test_xgb_regressor(objective): ref_explainer = shap.TreeExplainer(model=xgb_model) correct_out = ref_explainer.shap_values(X) - np.testing.assert_almost_equal(out, correct_out) + np.testing.assert_almost_equal(out, correct_out, decimal=5) np.testing.assert_almost_equal(explainer.expected_value, - ref_explainer.expected_value) + ref_explainer.expected_value, decimal=5) @pytest.mark.parametrize('objective,n_classes', @@ -102,9 +102,9 @@ def test_xgb_classifier(objective, n_classes): ref_explainer = shap.TreeExplainer(model=xgb_model) correct_out = ref_explainer.shap_values(X) - np.testing.assert_almost_equal(out, correct_out) + np.testing.assert_almost_equal(out, correct_out, decimal=5) np.testing.assert_almost_equal(explainer.expected_value, - ref_explainer.expected_value) + ref_explainer.expected_value, decimal=5) def test_degenerate_cases(): From dac390cdba05fdce8c09e5bb90ec049852e15d5e Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Sat, 15 Jan 2022 02:18:32 +0000 Subject: [PATCH 5/8] Use 2.2.1 patch release --- ci/gpu/build.sh | 2 +- conda/environments/cuml_dev_cuda11.0.yml | 2 +- conda/environments/cuml_dev_cuda11.2.yml | 2 +- conda/environments/cuml_dev_cuda11.4.yml | 2 +- conda/environments/cuml_dev_cuda11.5.yml | 2 +- conda/recipes/cuml/meta.yaml | 4 ++-- conda/recipes/libcuml/meta.yaml | 4 ++-- cpp/cmake/thirdparty/get_treelite.cmake | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 98fc750253..69d5022629 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -67,7 +67,7 @@ gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvid gpuci_conda_retry remove -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ --force rapids-build-env rapids-notebook-env gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ - treelite=2.2.0 + treelite=2.2.1 # https://docs.rapids.ai/maintainers/depmgmt/ # gpuci_mamba_retry remove --force rapids-build-env rapids-notebook-env diff --git a/conda/environments/cuml_dev_cuda11.0.yml b/conda/environments/cuml_dev_cuda11.0.yml index d7cc149b48..d851ebe624 100644 --- a/conda/environments/cuml_dev_cuda11.0.yml +++ b/conda/environments/cuml_dev_cuda11.0.yml @@ -22,7 +22,7 @@ dependencies: - faiss-proc=*=cuda - umap-learn - scikit-learn=0.24 -- treelite=2.2.0 +- treelite=2.2.1 - statsmodels - seaborn - hdbscan diff --git a/conda/environments/cuml_dev_cuda11.2.yml b/conda/environments/cuml_dev_cuda11.2.yml index 88e2c4bb4c..58f56b9417 100644 --- a/conda/environments/cuml_dev_cuda11.2.yml +++ b/conda/environments/cuml_dev_cuda11.2.yml @@ -22,7 +22,7 @@ dependencies: - faiss-proc=*=cuda - umap-learn - scikit-learn=0.24 -- treelite=2.2.0 +- treelite=2.2.1 - statsmodels - seaborn - hdbscan diff --git a/conda/environments/cuml_dev_cuda11.4.yml b/conda/environments/cuml_dev_cuda11.4.yml index 3ce1924b4b..6c4641dfc5 100644 --- a/conda/environments/cuml_dev_cuda11.4.yml +++ b/conda/environments/cuml_dev_cuda11.4.yml @@ -22,7 +22,7 @@ dependencies: - faiss-proc=*=cuda - umap-learn - scikit-learn=0.24 -- treelite=2.2.0 +- treelite=2.2.1 - statsmodels - seaborn - hdbscan diff --git a/conda/environments/cuml_dev_cuda11.5.yml b/conda/environments/cuml_dev_cuda11.5.yml index 7d524d9c5d..289d4dbc08 100644 --- a/conda/environments/cuml_dev_cuda11.5.yml +++ b/conda/environments/cuml_dev_cuda11.5.yml @@ -22,7 +22,7 @@ dependencies: - faiss-proc=*=cuda - umap-learn - scikit-learn=0.24 -- treelite=2.2.0 +- treelite=2.2.1 - statsmodels - seaborn - hdbscan diff --git a/conda/recipes/cuml/meta.yaml b/conda/recipes/cuml/meta.yaml index c56f31005f..0ad2443126 100644 --- a/conda/recipes/cuml/meta.yaml +++ b/conda/recipes/cuml/meta.yaml @@ -30,7 +30,7 @@ requirements: - setuptools - cython>=0.29,<0.30 - cmake>=3.20.1 - - treelite=2.2.0 + - treelite=2.2.1 - cudf {{ minor_version }} - libcuml={{ version }} - libcumlprims {{ minor_version }} @@ -44,7 +44,7 @@ requirements: - libcuml={{ version }} - libcumlprims {{ minor_version }} - cupy>=7.8.0,<10.0.0a0 - - treelite=2.2.0 + - treelite=2.2.1 - nccl>=2.9.9 - ucx-py {{ ucx_py_version }} - ucx-proc=*=gpu diff --git a/conda/recipes/libcuml/meta.yaml b/conda/recipes/libcuml/meta.yaml index 05877c35e9..9f395b637b 100644 --- a/conda/recipes/libcuml/meta.yaml +++ b/conda/recipes/libcuml/meta.yaml @@ -43,7 +43,7 @@ requirements: - ucx-proc=*=gpu - libcumlprims {{ minor_version }} - lapack - - treelite=2.2.0 + - treelite=2.2.1 - faiss-proc=*=cuda - gtest=1.10.0 - gmock @@ -55,7 +55,7 @@ requirements: - ucx-py {{ ucx_py_version }} - ucx-proc=*=gpu - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} - - treelite=2.2.0 + - treelite=2.2.1 - faiss-proc=*=cuda - libfaiss 1.7.0 *_cuda - libcusolver>=11.2.1 diff --git a/cpp/cmake/thirdparty/get_treelite.cmake b/cpp/cmake/thirdparty/get_treelite.cmake index bcbf65aa6b..4faf14869d 100644 --- a/cpp/cmake/thirdparty/get_treelite.cmake +++ b/cpp/cmake/thirdparty/get_treelite.cmake @@ -54,5 +54,5 @@ function(find_and_configure_treelite) endfunction() -find_and_configure_treelite(VERSION 2.2.0 - PINNED_TAG 2a62c6f569a6b12520cbfc35b4a727bb6bb671b1) +find_and_configure_treelite(VERSION 2.2.1 + PINNED_TAG 1f9c5054ad7433fa88623fccf0ae46a6ba6a27c6) From b31b52db5ce43adfe9fd77eec5f537630e1fdddd Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Sat, 15 Jan 2022 07:30:27 +0000 Subject: [PATCH 6/8] Update copyright years --- python/cuml/test/explainer/test_gpu_treeshap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cuml/test/explainer/test_gpu_treeshap.py b/python/cuml/test/explainer/test_gpu_treeshap.py index e6161f2974..acbd49ed00 100644 --- a/python/cuml/test/explainer/test_gpu_treeshap.py +++ b/python/cuml/test/explainer/test_gpu_treeshap.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2022, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 2b4c73fe454a899fd2bc33371c0b5a6b5bc8bcb8 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Mon, 24 Jan 2022 10:59:09 -0800 Subject: [PATCH 7/8] Update build.sh --- ci/gpu/build.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 69d5022629..130df90755 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -64,13 +64,8 @@ gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvid "rapids-doc-env=${MINOR_VERSION}.*" \ "shap>=0.37,<=0.39" -gpuci_conda_retry remove -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ - --force rapids-build-env rapids-notebook-env -gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ - treelite=2.2.1 - # https://docs.rapids.ai/maintainers/depmgmt/ -# gpuci_mamba_retry remove --force rapids-build-env rapids-notebook-env +# gpuci_conda_retry remove --force rapids-build-env rapids-notebook-env # gpuci_mamba_retry install -y "your-pkg=1.0.0" gpuci_logger "Install contextvars if needed" From 18d6a6cd86356a1a95c50eb1eb8026d4667ad502 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Mon, 24 Jan 2022 14:59:34 -0800 Subject: [PATCH 8/8] Update get_treelite.cmake --- cpp/cmake/thirdparty/get_treelite.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/cmake/thirdparty/get_treelite.cmake b/cpp/cmake/thirdparty/get_treelite.cmake index 531d9d5e7e..c85e9cd335 100644 --- a/cpp/cmake/thirdparty/get_treelite.cmake +++ b/cpp/cmake/thirdparty/get_treelite.cmake @@ -90,5 +90,5 @@ function(find_and_configure_treelite) endfunction() find_and_configure_treelite(VERSION 2.2.1 - PINNED_TAG 1f9c5054ad7433fa88623fccf0ae46a6ba6a27c6) + PINNED_TAG 1f9c5054ad7433fa88623fccf0ae46a6ba6a27c6 BUILD_STATIC_LIBS ${CUML_USE_TREELITE_STATIC})