Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Treelite to 2.2.1 #4484

Merged
merged 10 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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_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
hcho3 marked this conversation as resolved.
Show resolved Hide resolved
# gpuci_mamba_retry install -y "your-pkg=1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cuml_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
- faiss-proc=*=cuda
- umap-learn
- scikit-learn=0.24
- treelite=2.1.0
- treelite=2.2.1
- statsmodels
- seaborn
- hdbscan
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cuml_dev_cuda11.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
- faiss-proc=*=cuda
- umap-learn
- scikit-learn=0.24
- treelite=2.1.0
- treelite=2.2.1
- statsmodels
- seaborn
- hdbscan
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cuml_dev_cuda11.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
- faiss-proc=*=cuda
- umap-learn
- scikit-learn=0.24
- treelite=2.1.0
- treelite=2.2.1
- statsmodels
- seaborn
- hdbscan
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cuml_dev_cuda11.5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
- faiss-proc=*=cuda
- umap-learn
- scikit-learn=0.24
- treelite=2.1.0
- treelite=2.2.1
- statsmodels
- seaborn
- hdbscan
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/cuml/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ requirements:
- setuptools
- cython>=0.29,<0.30
- cmake>=3.20.1
- treelite=2.1.0
- treelite=2.2.1
- cudf {{ minor_version }}
- libcuml={{ version }}
- libcumlprims {{ minor_version }}
Expand All @@ -44,7 +44,7 @@ requirements:
- libcuml={{ version }}
- libcumlprims {{ minor_version }}
- cupy>=7.8.0,<11.0.0a0
- treelite=2.1.0
- treelite=2.2.1
- nccl>=2.9.9
- ucx-py {{ ucx_py_version }}
- ucx-proc=*=gpu
Expand Down
6 changes: 3 additions & 3 deletions conda/recipes/libcuml/meta.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -43,7 +43,7 @@ requirements:
- ucx-proc=*=gpu
- libcumlprims {{ minor_version }}
- lapack
- treelite=2.1.0
- treelite=2.2.1
- faiss-proc=*=cuda
- gtest=1.10.0
- gmock
Expand All @@ -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.1
- faiss-proc=*=cuda
- libfaiss 1.7.0 *_cuda
- libcusolver>=11.2.1
Expand Down
6 changes: 3 additions & 3 deletions cpp/cmake/thirdparty/get_treelite.cmake
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.1
PINNED_TAG 1f9c5054ad7433fa88623fccf0ae46a6ba6a27c6)
hcho3 marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 5 additions & 5 deletions python/cuml/test/explainer/test_gpu_treeshap.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
hcho3 marked this conversation as resolved.
Show resolved Hide resolved


@pytest.mark.parametrize('objective,n_classes',
Expand Down Expand Up @@ -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():
Expand Down