-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6146 from vyasr/branch-25.02-merge-branch-24.12
Forward-merge branch-24.12 into branch-25.02
- Loading branch information
Showing
47 changed files
with
4,085 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
# Please keep pr-builder as the top job here | ||
pr-builder: | ||
needs: | ||
- changed-files | ||
|
@@ -23,6 +24,7 @@ jobs: | |
- conda-python-tests-dask | ||
- conda-notebook-tests | ||
- docs-build | ||
- telemetry-setup | ||
- wheel-build-cuml | ||
- wheel-tests-cuml | ||
- devcontainer | ||
|
@@ -31,8 +33,17 @@ jobs: | |
if: always() | ||
with: | ||
needs: ${{ toJSON(needs) }} | ||
telemetry-setup: | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
env: | ||
OTEL_SERVICE_NAME: "pr-cuml" | ||
steps: | ||
- name: Telemetry setup | ||
uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main | ||
changed-files: | ||
secrets: inherit | ||
needs: telemetry-setup | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
files_yaml: | | ||
|
@@ -66,11 +77,12 @@ jobs: | |
- '!thirdparty/LICENSES/**' | ||
checks: | ||
secrets: inherit | ||
needs: telemetry-setup | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
enable_check_generated_files: false | ||
ignored_pr_jobs: >- | ||
optional-job-conda-python-tests-cudf-pandas-integration | ||
optional-job-conda-python-tests-cudf-pandas-integration telemetry-summarize | ||
clang-tidy: | ||
needs: checks | ||
secrets: inherit | ||
|
@@ -101,7 +113,6 @@ jobs: | |
with: | ||
build_type: pull-request | ||
enable_check_symbols: true | ||
symbol_exclusions: raft_cutlass | ||
conda-python-build: | ||
needs: conda-cpp-build | ||
secrets: inherit | ||
|
@@ -173,6 +184,7 @@ jobs: | |
build_type: pull-request | ||
script: ci/test_wheel.sh | ||
devcontainer: | ||
needs: telemetry-setup | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
|
@@ -183,3 +195,18 @@ jobs: | |
sccache -z; | ||
build-all --verbose; | ||
sccache -s; | ||
telemetry-summarize: | ||
runs-on: ubuntu-latest | ||
needs: pr-builder | ||
if: always() | ||
continue-on-error: true | ||
steps: | ||
- name: Load stashed telemetry env vars | ||
uses: rapidsai/shared-actions/telemetry-dispatch-load-base-env-vars@main | ||
with: | ||
load_service_name: true | ||
- name: Telemetry summarize | ||
uses: rapidsai/shared-actions/telemetry-dispatch-write-summary@main | ||
with: | ||
cert_concat: "${{ secrets.OTEL_EXPORTER_OTLP_CA_CERTIFICATE }};${{ secrets.OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE }};${{ secrets.OTEL_EXPORTER_OTLP_CLIENT_KEY }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
# Support invoking run_cuml_singlegpu_pytests.sh outside the script directory | ||
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cuml/cuml/tests/experimental/accel | ||
|
||
python -m pytest -p cuml.experimental.accel --cache-clear "$@" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# | ||
# Copyright (c) 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. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
|
||
import importlib | ||
|
||
from .magics import load_ipython_extension | ||
|
||
from cuml.internals import logger | ||
from cuml.internals.global_settings import GlobalSettings | ||
from cuml.internals.memory_utils import set_global_output_type | ||
|
||
__all__ = ["load_ipython_extension", "install"] | ||
|
||
|
||
def _install_for_library(library_name): | ||
importlib.import_module(f"._wrappers.{library_name}", __name__) | ||
return True | ||
|
||
|
||
def install(): | ||
"""Enable cuML Accelerator Mode.""" | ||
logger.set_level(logger.level_info) | ||
logger.set_pattern("%v") | ||
|
||
logger.info("cuML: Installing experimental accelerator...") | ||
loader_sklearn = _install_for_library(library_name="sklearn") | ||
loader_umap = _install_for_library(library_name="umap") | ||
loader_hdbscan = _install_for_library(library_name="hdbscan") | ||
|
||
GlobalSettings().accelerator_loaded = all( | ||
[loader_sklearn, loader_umap, loader_hdbscan] | ||
) | ||
|
||
GlobalSettings().accelerator_active = True | ||
|
||
if GlobalSettings().accelerator_loaded: | ||
logger.info( | ||
"cuML: experimental accelerator successfully initialized..." | ||
) | ||
else: | ||
logger.info("cuML: experimental accelerator failed to initialize...") | ||
|
||
set_global_output_type("numpy") | ||
|
||
|
||
def pytest_load_initial_conftests(early_config, parser, args): | ||
# https://docs.pytest.org/en/7.1.x/reference/\ | ||
# reference.html#pytest.hookspec.pytest_load_initial_conftests | ||
try: | ||
install() | ||
except RuntimeError: | ||
raise RuntimeError( | ||
"An existing plugin has already loaded sklearn. Interposing failed." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# | ||
# Copyright (c) 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. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
import click | ||
import code | ||
import os | ||
import runpy | ||
import sys | ||
|
||
from . import install | ||
|
||
|
||
@click.command() | ||
@click.option("-m", "module", required=False, help="Module to run") | ||
@click.option( | ||
"--strict", | ||
is_flag=True, | ||
default=False, | ||
help="Turn strict mode for hyperparameters on.", | ||
) | ||
@click.argument("args", nargs=-1) | ||
def main(module, strict, args): | ||
|
||
if strict: | ||
os.environ["CUML_ACCEL_STRICT_MODE"] = "ON" | ||
|
||
install() | ||
|
||
if module: | ||
(module,) = module | ||
# run the module passing the remaining arguments | ||
# as if it were run with python -m <module> <args> | ||
sys.argv[:] = [module] + args # not thread safe? | ||
runpy.run_module(module, run_name="__main__") | ||
elif len(args) >= 1: | ||
# Remove ourself from argv and continue | ||
sys.argv[:] = args | ||
runpy.run_path(args[0], run_name="__main__") | ||
else: | ||
if sys.stdin.isatty(): | ||
banner = f"Python {sys.version} on {sys.platform}" | ||
site_import = not sys.flags.no_site | ||
if site_import: | ||
cprt = 'Type "help", "copyright", "credits" or "license" for more information.' | ||
banner += "\n" + cprt | ||
else: | ||
# Don't show prompts or banners if stdin is not a TTY | ||
sys.ps1 = "" | ||
sys.ps2 = "" | ||
banner = "" | ||
|
||
# Launch an interactive interpreter | ||
code.interact(banner=banner, exitmsg="") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.