diff --git a/conda/environments/cuml_dev_cuda11.0.yml b/conda/environments/cuml_dev_cuda11.0.yml index a4ef7e67cf..90d9227a47 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.23.1 -- treelite=1.3.0 +- treelite=2.0.0 - statsmodels - seaborn - hdbscan diff --git a/conda/environments/cuml_dev_cuda11.2.yml b/conda/environments/cuml_dev_cuda11.2.yml index 1b4ed6ef39..87aa8f8cf2 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.23.1 -- treelite=1.3.0 +- treelite=2.0.0 - statsmodels - seaborn - hdbscan diff --git a/conda/recipes/cuml/meta.yaml b/conda/recipes/cuml/meta.yaml index 73ab6b9034..754d7ea874 100644 --- a/conda/recipes/cuml/meta.yaml +++ b/conda/recipes/cuml/meta.yaml @@ -28,7 +28,7 @@ requirements: - setuptools - cython>=0.29,<0.30 - cmake>=3.20.1 - - treelite=1.3.0 + - treelite=2.0.0 - cudf {{ minor_version }} - libcuml={{ version }} - libcumlprims {{ minor_version }} @@ -42,7 +42,7 @@ requirements: - libcuml={{ version }} - libcumlprims {{ minor_version }} - cupy>=7.8.0,<10.0.0a0 - - treelite=1.3.0 + - treelite=2.0.0 - nccl>=2.9.9 - ucx-py 0.21 - ucx-proc=*=gpu diff --git a/conda/recipes/libcuml/meta.yaml b/conda/recipes/libcuml/meta.yaml index c66f760090..2a8d0f08a7 100644 --- a/conda/recipes/libcuml/meta.yaml +++ b/conda/recipes/libcuml/meta.yaml @@ -45,7 +45,7 @@ requirements: - ucx-proc=*=gpu - libcumlprims {{ minor_version }} - lapack - - treelite=1.3.0 + - treelite=2.0.0 - faiss-proc=*=cuda - gtest=1.10.0 - gmock @@ -57,7 +57,7 @@ requirements: - ucx-py 0.21 - ucx-proc=*=gpu - {{ pin_compatible('cudatoolkit', max_pin='x.x') }} - - treelite=1.3.0 + - treelite=2.0.0 - faiss-proc=*=cuda - conda-forge::libfaiss=1.7.0 diff --git a/cpp/cmake/thirdparty/get_treelite.cmake b/cpp/cmake/thirdparty/get_treelite.cmake index c8312eafbf..47ab6e38cb 100644 --- a/cpp/cmake/thirdparty/get_treelite.cmake +++ b/cpp/cmake/thirdparty/get_treelite.cmake @@ -58,5 +58,5 @@ function(find_and_configure_treelite) endfunction() -find_and_configure_treelite(VERSION 1.3.0 - PINNED_TAG ae5436c45563a5c2ed7aa8f0f41f88fff48f49e4) +find_and_configure_treelite(VERSION 2.0.0 + PINNED_TAG b117da58d7d9a5cc54aa3711e5ad9a8407734c6e) diff --git a/cpp/src/randomforest/randomforest.cu b/cpp/src/randomforest/randomforest.cu index a1169fd015..38a13c936f 100644 --- a/cpp/src/randomforest/randomforest.cu +++ b/cpp/src/randomforest/randomforest.cu @@ -292,8 +292,7 @@ void build_treelite_forest(ModelHandle* model_handle, model->task_type = tl::TaskType::kBinaryClfRegr; } - model->task_param = - tl::TaskParameter{tl::TaskParameter::OutputType::kFloat, false, num_class, num_class}; + model->task_param = tl::TaskParam{tl::TaskParam::OutputType::kFloat, false, num_class, num_class}; model->num_feature = num_features; model->average_tree_output = true; model->SetTreeLimit(forest->rf_params.n_trees); diff --git a/cpp/test/sg/rf_treelite_test.cu b/cpp/test/sg/rf_treelite_test.cu index 867793c087..f613a0fe03 100644 --- a/cpp/test/sg/rf_treelite_test.cu +++ b/cpp/test/sg/rf_treelite_test.cu @@ -89,14 +89,13 @@ class RfTreeliteTestCommon : public ::testing::TestWithParam> { CompilerHandle compiler; // "ast_navive" is the default compiler treelite used in their Python code. - TREELITE_CHECK(TreeliteCompilerCreate("ast_native", &compiler)); + TREELITE_CHECK(TreeliteCompilerCreateV2("ast_native", "{}", &compiler)); - int verbose = 0; // Generate C code in the directory specified below. // The parallel comilplation is disabled. To enable it, one needs to specify parallel_comp of // CompilerHandle. Treelite will create a directory if it doesn't exist. TREELITE_CHECK( - TreeliteCompilerGenerateCode(compiler, treelite_indiv_handles[0], verbose, dir_name.c_str())); + TreeliteCompilerGenerateCodeV2(compiler, treelite_indiv_handles[0], dir_name.c_str())); TREELITE_CHECK(TreeliteCompilerFree(compiler)); // Options copied from @@ -135,6 +134,7 @@ class RfTreeliteTestCommon : public ::testing::TestWithParam> { // avoid seg faults. Altough later we only use first params.n_inference_rows elements. size_t treelite_predicted_labels_size; + int verbose = 0; TREELITE_CHECK(TreelitePredictorPredictBatch(predictor, dmat, verbose,