Skip to content

Commit

Permalink
Merge branch 'branch-24.10' into fix-remove-old-dask-logreg
Browse files Browse the repository at this point in the history
  • Loading branch information
divyegala authored Sep 23, 2024
2 parents 3adb4f0 + 7de8831 commit 2aba48c
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 102 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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10
with:
build_type: pull-request
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
with:
build_type: pull-request
script: ci/test_wheel.sh
devcontainer:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
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@python-3.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
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 @@ -9,7 +9,7 @@ repos:
files: python/.*
args: [--config, python/cuml/pyproject.toml]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 7.1.1
hooks:
- id: flake8
args: [--config=python/cuml/.flake8]
Expand Down
10 changes: 3 additions & 7 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ rapids-logger "pytest cuml single GPU"
-k 'test_sparse_pca_inputs' \
--junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-sparse-pca.xml"

# Temporarily disabled for CUDA 12.x wheels.
# Reference issue: https://github.com/rapidsai/cuml/issues/6050
if [[ "${RAPIDS_PY_CUDA_SUFFIX}" == "cu11" ]]; then
rapids-logger "pytest cuml-dask"
./ci/run_cuml_dask_pytests.sh \
--junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-dask.xml"
fi
rapids-logger "pytest cuml-dask"
./ci/run_cuml_dask_pytests.sh \
--junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-dask.xml"

rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
10 changes: 4 additions & 6 deletions python/cuml/cuml/common/kernel_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, 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 @@ -101,11 +101,9 @@ def cuda_kernel_factory(nvrtc_kernel_str, dtypes, kernel_name=None):
"{%d}" % idx, dtype_strs[idx]
)

kernel_name = f"""{uuid1()
if kernel_name is None
else kernel_name}_{
"".join(dtype_strs).replace(" ", "_")
}"""
kernel_name_prefix = uuid1() if kernel_name is None else kernel_name
kernel_name_suffix = "".join(dtype_strs).replace(" ", "_")
kernel_name = f"{kernel_name_prefix}_{kernel_name_suffix}"

nvrtc_kernel_str = "%s\nvoid %s%s" % (
extern_prefix,
Expand Down
4 changes: 2 additions & 2 deletions python/cuml/cuml/tests/dask/test_dask_pca.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, 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 @@ -73,7 +73,7 @@ def test_pca_fit(nrows, ncols, n_parts, input_type, client):
for attr in all_attr:
with_sign = False if attr in ["components_"] else True
cuml_res = getattr(cupca, attr)
if type(cuml_res) == np.ndarray:
if type(cuml_res) is np.ndarray:
cuml_res = cuml_res.to_numpy()
skl_res = getattr(skpca, attr)
assert array_equal(cuml_res, skl_res, 1e-1, with_sign=with_sign)
Expand Down
4 changes: 2 additions & 2 deletions python/cuml/cuml/tests/dask/test_dask_tsvd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, 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 @@ -81,7 +81,7 @@ def test_pca_fit(data_info, input_type, client):
for attr in all_attr:
with_sign = False if attr in ["components_"] else True
cuml_res = getattr(cutsvd, attr)
if type(cuml_res) == np.ndarray:
if type(cuml_res) is np.ndarray:
cuml_res = cuml_res.to_numpy()
skl_res = getattr(sktsvd, attr)
if attr == "singular_values_":
Expand Down
4 changes: 2 additions & 2 deletions python/cuml/cuml/tests/test_class_enumerator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2023, NVIDIA CORPORATION.
# Copyright (c) 2020-2024, 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 @@ -99,7 +99,7 @@ def test_class_enumerator_parameters():
class SomeModule:
class SomeClass(cuml.Base):
def __eq__(self, other):
return type(other) == type(self)
return type(other) is type(self)

models1 = ClassEnumerator(module=SomeModule).get_models()
models2 = ClassEnumerator(
Expand Down
12 changes: 6 additions & 6 deletions python/cuml/cuml/tests/test_compose.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-2024, 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 @@ -84,7 +84,7 @@ def test_column_transformer(
)
ft_X = transformer.fit_transform(X)
t_X = transformer.transform(X)
assert type(t_X) == type(X)
assert type(t_X) is type(X)

sk_transformers = [
("scaler", skStandardScaler(), sk_selec1),
Expand Down Expand Up @@ -135,7 +135,7 @@ def test_column_transformer_sparse(
if dataset_density < sparse_threshold:
# Sparse input -> sparse output if dataset_density > sparse_threshold
# else sparse input -> dense output
assert type(t_X) == type(X)
assert type(t_X) is type(X)

sk_transformers = [
("scaler", skStandardScaler(with_mean=False), [0, 2]),
Expand Down Expand Up @@ -174,7 +174,7 @@ def test_make_column_transformer(clf_dataset, remainder): # noqa: F811

ft_X = transformer.fit_transform(X)
t_X = transformer.transform(X)
assert type(t_X) == type(X)
assert type(t_X) is type(X)

transformer = sk_make_column_transformer(
(skStandardScaler(), sk_selec1),
Expand Down Expand Up @@ -210,7 +210,7 @@ def test_make_column_transformer_sparse(
if dataset_density < sparse_threshold:
# Sparse input -> sparse output if dataset_density > sparse_threshold
# else sparse input -> dense output
assert type(t_X) == type(X)
assert type(t_X) is type(X)

transformer = sk_make_column_transformer(
(skStandardScaler(with_mean=False), [0, 2]),
Expand Down Expand Up @@ -313,7 +313,7 @@ def test_make_column_selector():
sk_t_X = transformer.fit_transform(X_np)

assert_allclose(t_X, sk_t_X)
assert type(t_X) == type(X)
assert type(t_X) is type(X)


def test_column_transformer_index(clf_dataset): # noqa: F811
Expand Down
Loading

0 comments on commit 2aba48c

Please sign in to comment.