Skip to content

Commit 4dccea9

Browse files
committed
Update sklearn_testing.py
1 parent 47441d1 commit 4dccea9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

mlinsights/mlmodel/sklearn_testing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ def test_sklearn_grid_search_cv(fct_model, X, y=None, sample_weight=None, **grid
259259
clf = GridSearchCV(pipe, parameters)
260260
if y_train is None and w_train is None:
261261
clf.fit(X_train)
262+
elif w_train is None:
263+
clf.fit(X_train, y_train) # pylint: disable=E1121
262264
else:
263265
clf.fit(X_train, y_train, w_train) # pylint: disable=E1121
264266
score = clf.score(X_test, y_test)

0 commit comments

Comments
 (0)