Skip to content

Commit 88b4b0a

Browse files
committed
Backport PR rapidsai#6364
1 parent 7c0b2b4 commit 88b4b0a

2 files changed

Lines changed: 24 additions & 6 deletions

File tree

python/cuml/cuml/experimental/accel/__main__.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
import runpy
2323
import sys
2424

25-
from cuml.internals import logger
26-
27-
from . import install
28-
2925

3026
@click.command()
3127
@click.option("-m", "module", required=False, help="Module to run")
@@ -66,10 +62,32 @@
6662
count=True,
6763
help="Increase output verbosity (can be used multiple times, e.g. -vv). Default shows warnings only.",
6864
)
65+
@click.option(
66+
"--cudf-pandas",
67+
is_flag=True,
68+
default=False,
69+
help="Turn on cudf.pandas alongside cuml.accel.",
70+
)
6971
@click.argument("args", nargs=-1)
7072
def main(
71-
module, convert_to_sklearn, format, output, disable_uvm, verbose, args
73+
module,
74+
convert_to_sklearn,
75+
format,
76+
output,
77+
disable_uvm,
78+
verbose,
79+
cudf_pandas,
80+
args,
7281
):
82+
if cudf_pandas:
83+
import cudf.pandas
84+
85+
cudf.pandas.install()
86+
87+
# avoid importing cuML before cuDF.pandas
88+
from cuml.internals import logger
89+
from . import install
90+
7391
default_logger_level_index = list(logger.level_enum).index(
7492
logger.level_enum.warn
7593
)

python/cuml/cuml/tests/test_pickle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
1+
# Copyright (c) 2019-2025, NVIDIA CORPORATION.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)