Skip to content

Commit 7b18440

Browse files
authored
Address cuml RandomForestClassifier(max_depth=) deprecation (rapidsai#22324)
xref rapidsai/cuml#7958 (IIUC, 16 was the previous default) Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - Matthew Murray (https://github.com/Matt711) URL: rapidsai#22324
1 parent 953b55a commit 7b18440

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • python/cudf/cudf_pandas_tests/third_party_integration_tests/tests

python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/test_cuml.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION.
1+
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION.
22
# SPDX-License-Identifier: Apache-2.0
33
import cupy as cp
44
import numpy as np
@@ -94,7 +94,9 @@ def test_random_forest(binary_classification_data):
9494
X_train, X_test, y_train, y_test = train_test_split(
9595
X, y, test_size=0.2, random_state=42
9696
)
97-
model = RandomForestClassifier(n_estimators=100, n_bins=len(X_train))
97+
model = RandomForestClassifier(
98+
n_estimators=100, n_bins=len(X_train), max_depth=16
99+
)
98100
model.fit(X_train, y_train)
99101
preds = model.predict(X_test)
100102
return preds.values

0 commit comments

Comments
 (0)