Skip to content

Commit 2462e0d

Browse files
committed
Drop deprecated tests
1 parent 31756f3 commit 2462e0d

2 files changed

Lines changed: 0 additions & 31 deletions

File tree

python/cuml/tests/test_sklearn_import_export.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,9 +964,6 @@ def test_linear_svc(random_state):
964964
assert sk_score > 0.7
965965

966966

967-
@pytest.mark.filterwarnings(
968-
"ignore:TargetEncoder currently returns 1D output:FutureWarning"
969-
)
970967
def test_target_encoder(random_state):
971968
# Create simple categorical data
972969
X = np.array(

python/cuml/tests/test_target_encoder.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,11 @@
1010
from cuml.preprocessing._target_encoder import TargetEncoder
1111
from cuml.testing.utils import array_equal
1212

13-
# Filter the combination mode deprecation warning for all tests in this module
14-
pytestmark = pytest.mark.filterwarnings(
15-
"ignore:TargetEncoder currently returns 1D output:FutureWarning"
16-
)
17-
1813
# TODO: many of these tests use `output_type="numpy"` to work around
1914
# https://github.com/rapidsai/cuml/issues/7893. These can be
2015
# reverted once that's resolved.
2116

2217

23-
def test_targetencoder_deprecated_1d_input():
24-
df = cudf.DataFrame(
25-
{"category": ["a", "b", "b", "a"], "label": [1, 0, 1, 1]}
26-
)
27-
28-
# Warns in fit_transform
29-
encoder = TargetEncoder(output_type="numpy")
30-
with pytest.warns(FutureWarning, match="non-2-dimensional X"):
31-
encoded = encoder.fit_transform(df.category, df.label)
32-
answer = np.array([1.0, 1.0, 0.0, 1.0])[:, None]
33-
assert array_equal(encoded, answer)
34-
35-
# Warns in fit
36-
encoder = TargetEncoder(output_type="numpy")
37-
with pytest.warns(FutureWarning, match="non-2-dimensional X"):
38-
encoder.fit(df.category, df.label)
39-
40-
# Warns in tarnsform
41-
with pytest.warns(FutureWarning, match="non-2-dimensional X"):
42-
encoded = encoder.transform(df.category)
43-
assert array_equal(encoded, answer)
44-
45-
4618
def test_targetencoder_fit_transform():
4719
train = cudf.DataFrame({"category": ["a", "b", "b", "a"]})
4820
label = cudf.Series([1, 0, 1, 1])

0 commit comments

Comments
 (0)