Skip to content

Commit

Permalink
Merge branch 'branch-24.10' into bug-wheels_dask_pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
dantegd authored Sep 16, 2024
2 parents 969796e + 28641bb commit 28677b9
Show file tree
Hide file tree
Showing 23 changed files with 309 additions and 92 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -38,7 +38,7 @@ jobs:
if: github.ref_type == 'branch'
needs: [python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@python-3.12
with:
arch: "amd64"
branch: ${{ inputs.branch }}
Expand All @@ -51,7 +51,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -60,15 +60,15 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-build-cuml:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -84,7 +84,7 @@ jobs:
wheel-publish-cuml:
needs: wheel-build-cuml
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ jobs:
- wheel-tests-cuml
- devcontainer
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@python-3.12
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@python-3.12
with:
enable_check_generated_files: false
ignored_pr_jobs: >-
optional-job-conda-python-tests-cudf-pandas-integration
clang-tidy:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@python-3.12
with:
build_type: pull-request
node_type: "cpu8"
Expand All @@ -47,55 +47,55 @@ jobs:
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@python-3.12
with:
build_type: pull-request
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@python-3.12
with:
build_type: pull-request
conda-cpp-checks:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@python-3.12
with:
build_type: pull-request
enable_check_symbols: true
symbol_exclusions: raft_cutlass
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@python-3.12
with:
build_type: pull-request
conda-python-tests-singlegpu:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@python-3.12
with:
build_type: pull-request
script: "ci/test_python_singlegpu.sh"
optional-job-conda-python-tests-cudf-pandas-integration:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@python-3.12
with:
matrix_filter: map(select(.ARCH == "amd64"))
build_type: pull-request
script: "ci/test_python_integration.sh"
conda-python-tests-dask:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@python-3.12
with:
build_type: pull-request
script: "ci/test_python_dask.sh"
conda-notebook-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@python-3.12
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -105,7 +105,7 @@ jobs:
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@python-3.12
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -115,7 +115,7 @@ jobs:
wheel-build-cuml:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@python-3.12
with:
build_type: pull-request
script: ci/build_wheel.sh
Expand All @@ -125,13 +125,13 @@ jobs:
wheel-tests-cuml:
needs: wheel-build-cuml
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@python-3.12
with:
build_type: pull-request
script: ci/test_wheel.sh
devcontainer:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@python-3.12
with:
arch: '["amd64"]'
cuda: '["12.5"]'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
conda-cpp-checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@python-3.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand All @@ -26,15 +26,15 @@ jobs:
symbol_exclusions: raft_cutlass
conda-cpp-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@python-3.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
conda-python-tests-singlegpu:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@python-3.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand All @@ -43,7 +43,7 @@ jobs:
script: "ci/test_python_singlegpu.sh"
conda-python-tests-dask:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@python-3.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand All @@ -52,7 +52,7 @@ jobs:
script: "ci/test_python_dask.sh"
wheel-tests-cuml:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@python-3.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ repos:
pass_filenames: false
language: python
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v0.3.1
rev: v0.4.0
hooks:
- id: verify-copyright
files: |
Expand Down
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To install cuML from source, ensure the following dependencies are met:
It is recommended to use conda for environment/package management. If doing so, development environment .yaml files are located in `conda/environments/all_*.yaml`. These files contains most of the dependencies mentioned above (notable exceptions are `gcc` and `zlib`). To create a development environment named `cuml_dev`, you can use the follow commands:

```bash
conda create -n cuml_dev python=3.11
conda create -n cuml_dev python=3.12
conda env update -n cuml_dev --file=conda/environments/all_cuda-118_arch-x86_64.yaml
conda activate cuml_dev
```
Expand Down
5 changes: 3 additions & 2 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pytest==7.*
- python>=3.10,<3.12
- python>=3.10,<3.13
- raft-dask==24.10.*,>=0.0.0a0
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rapids-dask-dependency==24.10.*,>=0.0.0a0
Expand All @@ -68,13 +68,14 @@ dependencies:
- scikit-learn==1.5
- scipy>=1.8.0
- seaborn
- setuptools
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx<6
- statsmodels
- sysroot_linux-64==2.17
- treelite==4.3.0
- umap-learn==0.5.3
- umap-learn==0.5.6
- pip:
- dask-glm==0.3.0
name: all_cuda-118_arch-x86_64
5 changes: 3 additions & 2 deletions conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pytest==7.*
- python>=3.10,<3.12
- python>=3.10,<3.13
- raft-dask==24.10.*,>=0.0.0a0
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rapids-dask-dependency==24.10.*,>=0.0.0a0
Expand All @@ -64,13 +64,14 @@ dependencies:
- scikit-learn==1.5
- scipy>=1.8.0
- seaborn
- setuptools
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx<6
- statsmodels
- sysroot_linux-64==2.17
- treelite==4.3.0
- umap-learn==0.5.3
- umap-learn==0.5.6
- pip:
- dask-glm==0.3.0
name: all_cuda-125_arch-x86_64
2 changes: 1 addition & 1 deletion conda/recipes/cuml-cpu/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ requirements:
- pandas
- scikit-learn=1.2
- hdbscan>=0.8.38,<0.8.39
- umap-learn=0.5.3
- umap-learn=0.5.6
- nvtx

tests: # [linux64]
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cuml/experimental/fil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ similar load methods for each of the serialization formats it supports.

```cpp
auto filename = "xgboost.json";
auto tl_model = treelite::frontend::LoadXGBoostModel(filename);
auto tl_model = treelite::model_loader::LoadXGBoostModelJSON(filename, "{}");
```

We then import the Treelite model into FIL via the
Expand Down
21 changes: 21 additions & 0 deletions cpp/include/cuml/manifold/umap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,27 @@ void refine(const raft::handle_t& handle,
UMAPParams* params,
float* embeddings);

/**
* Initializes embeddings and performs a UMAP fit on them, which enables
* iterative fitting without callbacks.
*
* @param[in] handle: raft::handle_t
* @param[in] X: pointer to input array
* @param[in] n: n_samples of input array
* @param[in] d: n_features of input array
* @param[in] graph: pointer to raft::sparse::COO object computed using ML::UMAP::get_graph
* @param[in] params: pointer to ML::UMAPParams object
* @param[out] embeddings: pointer to current embedding with shape n * n_components, stores updated
* embeddings on executing refine
*/
void init_and_refine(const raft::handle_t& handle,
float* X,
int n,
int d,
raft::sparse::COO<float, int>* graph,
UMAPParams* params,
float* embeddings);

/**
* Dense fit
*
Expand Down
8 changes: 5 additions & 3 deletions cpp/src/fil/treelite_import.cu
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,11 @@ void tl2fil_common(forest_params_t* params,
ASSERT(model.num_target == 1, "FIL does not support multi-target models");

// assuming either all leaves use the .leaf_vector() or all leaves use .leaf_value()
size_t leaf_vec_size = tl_leaf_vector_size(model);
std::size_t leaf_vec_size = tl_leaf_vector_size(model);
std::string pred_transform(model.postprocessor);
if (leaf_vec_size > 0) {
ASSERT(leaf_vec_size == model.num_class[0], "treelite model inconsistent");
ASSERT(leaf_vec_size == static_cast<std::size_t>(model.num_class[0]),
"treelite model inconsistent");
params->num_classes = leaf_vec_size;
params->leaf_algo = leaf_algo_t::VECTOR_LEAF;

Expand All @@ -513,7 +514,8 @@ void tl2fil_common(forest_params_t* params,
// Ensure that the trees follow the grove-per-class layout.
for (size_t tree_id = 0; tree_id < model_preset.trees.size(); ++tree_id) {
ASSERT(model.target_id[tree_id] == 0, "FIL does not support multi-target models");
ASSERT(model.class_id[tree_id] == tree_id % static_cast<size_t>(model.num_class[0]),
ASSERT(static_cast<std::size_t>(model.class_id[tree_id]) ==
tree_id % static_cast<size_t>(model.num_class[0]),
"The tree model is not compatible with FIL; the trees must be laid out "
"such that tree i's output contributes towards class (i %% num_class).");
}
Expand Down
19 changes: 19 additions & 0 deletions cpp/src/umap/runner.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,31 @@ void _refine(const raft::handle_t& handle,
value_t* embeddings)
{
cudaStream_t stream = handle.get_stream();
ML::Logger::get().setLevel(params->verbosity);

/**
* Run simplicial set embedding to approximate low-dimensional representation
*/
SimplSetEmbed::run<TPB_X, value_t>(inputs.n, inputs.d, graph, params, embeddings, stream);
}

template <typename value_idx, typename value_t, typename umap_inputs, int TPB_X>
void _init_and_refine(const raft::handle_t& handle,
const umap_inputs& inputs,
UMAPParams* params,
raft::sparse::COO<value_t>* graph,
value_t* embeddings)
{
cudaStream_t stream = handle.get_stream();
ML::Logger::get().setLevel(params->verbosity);

// Initialize embeddings
InitEmbed::run(handle, inputs.n, inputs.d, graph, params, embeddings, stream, params->init);

// Run simplicial set embedding
SimplSetEmbed::run<TPB_X, value_t>(inputs.n, inputs.d, graph, params, embeddings, stream);
}

template <typename value_idx, typename value_t, typename umap_inputs, int TPB_X>
void _fit(const raft::handle_t& handle,
const umap_inputs& inputs,
Expand Down
Loading

0 comments on commit 28677b9

Please sign in to comment.