Skip to content

Commit

Permalink
Fix deprecated positional arg usage (#5865)
Browse files Browse the repository at this point in the history
Split from #5799

Non-keyword args are deprecated from these signatures so fixing them where used

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #5865
  • Loading branch information
mroeschke authored Apr 25, 2024
1 parent d3d0ff3 commit 85194d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) 2019-2024, NVIDIA CORPORATION.

# This code originates from the Scikit-Learn library,
# it was since modified to allow GPU acceleration.
# This code is under BSD 3 clause license.
Expand Down Expand Up @@ -63,7 +65,7 @@ class FunctionTransformer(TransformerMixin, BaseEstimator):
--------
>>> import cupy as cp
>>> from cuml.preprocessing import FunctionTransformer
>>> transformer = FunctionTransformer(cp.log1p)
>>> transformer = FunctionTransformer(func=cp.log1p)
>>> X = cp.array([[0, 1], [2, 3]])
>>> transformer.transform(X)
array([[0. , 0.6931...],
Expand Down
4 changes: 2 additions & 2 deletions python/cuml/tests/dask/test_dask_serialization.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_serialize_mnmg_model(client):
X, y = make_regression(n_samples=1000, n_features=20, random_state=0)
X, y = da.from_array(X), da.from_array(y)

model = LinearRegression(client)
model = LinearRegression(client=client)
model.fit(X, y)

pickled_model = pickle.dumps(model)
Expand Down

0 comments on commit 85194d7

Please sign in to comment.