Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the default values of the scikit-learn constructor arguments #6309

Open
wants to merge 1 commit into
base: branch-25.04
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion python/cuml/cuml/experimental/accel/estimator_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,14 @@ def __init__(self, *args, **kwargs):
self._cpu_model_class = (
original_class_a # Store a reference to the original class
)
kwargs, self._gpuaccel = self._hyperparam_translator(**kwargs)

sklearn_args = inspect.signature(self._cpu_model_class)
sklearn_args = sklearn_args.bind(*args, **kwargs)
sklearn_args.apply_defaults()

kwargs, self._gpuaccel = self._hyperparam_translator(
**sklearn_args.arguments
)
super().__init__(*args, **kwargs)

self._cpu_hyperparams = list(
Expand Down
Loading