Skip to content

Commit

Permalink
Merge branch 'branch-23.12' into enable_sparse_multiclass_svm
Browse files Browse the repository at this point in the history
  • Loading branch information
mfoerste4 authored Oct 26, 2023
2 parents 6318451 + 2b5aa3e commit 458c231
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 32 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-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
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-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
arch: "amd64"
branch: ${{ inputs.branch }}
Expand All @@ -51,7 +51,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
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-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-build-cuml:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
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-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
- wheel-build-cuml
- wheel-tests-cuml
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
checks:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
enable_check_generated_files: false
clang-tidy:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
node_type: "cpu8"
Expand All @@ -43,39 +43,39 @@ jobs:
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
conda-python-tests-singlegpu:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
test_script: "ci/test_python_singlegpu.sh"
conda-python-tests-dask:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
test_script: "ci/test_python_dask.sh"
conda-notebook-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -85,7 +85,7 @@ jobs:
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -95,7 +95,7 @@ jobs:
wheel-build-cuml:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
script: ci/build_wheel.sh
Expand All @@ -105,7 +105,7 @@ jobs:
wheel-tests-cuml:
needs: wheel-build-cuml
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
script: ci/test_wheel.sh
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ on:
jobs:
conda-cpp-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
conda-python-tests-singlegpu:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand All @@ -33,7 +33,7 @@ jobs:
test_script: "ci/test_python_singlegpu.sh"
conda-python-tests-dask:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand All @@ -42,7 +42,7 @@ jobs:
test_script: "ci/test_python_dask.sh"
wheel-tests-cuml:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ done

# CI files
for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"
done
sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh
20 changes: 11 additions & 9 deletions python/cuml/model_selection/_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
# limitations under the License.
#

from typing import Union
from cuml.internals.safe_imports import gpu_only_import_from
from typing import Optional, Union

from cuml.common import input_to_cuml_array
from cuml.internals.array import array_to_memory_order
from cuml.internals.safe_imports import cpu_only_import
from cuml.internals.safe_imports import gpu_only_import
from cuml.internals.safe_imports import (
cpu_only_import,
gpu_only_import,
gpu_only_import_from,
)

cudf = gpu_only_import("cudf")
cp = gpu_only_import("cupy")
Expand Down Expand Up @@ -138,7 +141,6 @@ def _stratify_split(
if hasattr(X, "__cuda_array_interface__") or isinstance(
X, cupyx.scipy.sparse.csr_matrix
):

X_train_i = cp.array(
X[perm_indices_class_i[: n_i[i]]], order=x_order
)
Expand Down Expand Up @@ -244,11 +246,11 @@ def _approximate_mode(class_counts, n_draws, rng):
def train_test_split(
X,
y=None,
test_size: Union[float, int] = None,
train_size: Union[float, int] = None,
test_size: Optional[Union[float, int]] = None,
train_size: Optional[Union[float, int]] = None,
shuffle: bool = True,
random_state: Union[
int, cp.random.RandomState, np.random.RandomState
random_state: Optional[
Union[int, cp.random.RandomState, np.random.RandomState]
] = None,
stratify=None,
):
Expand Down

0 comments on commit 458c231

Please sign in to comment.