Skip to content

Commit

Permalink
Bugfix: tests that fail in sklearn 1.2 (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminBossan committed Dec 13, 2022
1 parent bd53b6e commit af18eea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions skorch/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ def test_print_help_sklearn_estimator(self, print_help, clf_sklearn, capsys):
'-- --help',
'--fit_intercept',
'--copy_X',
'--normalize',
]
for snippet in expected_snippets:
assert snippet in out
Expand All @@ -297,7 +296,6 @@ def test_print_help_sklearn_pipeline(self, print_help, pipe_sklearn, capsys):
'<MinMaxScaler> options',
'--features__scale__feature_range',
'--clf__fit_intercept',
'--clf__normalize',
]
for snippet in expected_snippets:
assert snippet in out
Expand Down Expand Up @@ -372,7 +370,7 @@ def test_parse_args_pipe_custom_defaults(self, parse_args, pipe):

def test_parse_args_sklearn_pipe_custom_defaults(self, parse_args, pipe_sklearn):
defaults = {'features__scale__copy': 123, 'clf__fit_intercept': 456}
kwargs = {'features__scale__copy': 555, 'clf__normalize': 789}
kwargs = {'features__scale__copy': 555, 'clf__n_jobs': 5}
parsed = parse_args(kwargs, defaults)
pipe = parsed(pipe_sklearn)
scaler = pipe.steps[0][1].transformer_list[0][1]
Expand All @@ -381,4 +379,4 @@ def test_parse_args_sklearn_pipe_custom_defaults(self, parse_args, pipe_sklearn)
# cmd line args have precedence over defaults
assert scaler.copy == 555
assert clf.fit_intercept == 456
assert clf.normalize == 789
assert clf.n_jobs == 5

0 comments on commit af18eea

Please sign in to comment.