Skip to content

Commit 2fde8d5

Browse files
authored
Update Pipeline description for >=1.0 (#1170)
1 parent 2ed77db commit 2fde8d5

1 file changed

Lines changed: 36 additions & 2 deletions

File tree

tests/test_extensions/test_sklearn_extension/test_sklearn_extension.py

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,24 @@ def test_serialize_pipeline(self):
399399
)
400400
fixture_short_name = "sklearn.Pipeline(StandardScaler,DummyClassifier)"
401401

402-
if version.parse(sklearn.__version__) >= version.parse("0.21.0"):
402+
if version.parse(sklearn.__version__) >= version.parse("1.0"):
403+
fixture_description = (
404+
"Pipeline of transforms with a final estimator.\n\nSequentially"
405+
" apply a list of transforms and a final estimator.\n"
406+
"Intermediate steps of the pipeline must be 'transforms', that "
407+
"is, they\nmust implement `fit` and `transform` methods.\nThe final "
408+
"estimator only needs to implement `fit`.\nThe transformers in "
409+
"the pipeline can be cached using ``memory`` argument.\n\nThe "
410+
"purpose of the pipeline is to assemble several steps that can "
411+
"be\ncross-validated together while setting different parameters"
412+
". For this, it\nenables setting parameters of the various steps"
413+
" using their names and the\nparameter name separated by a `'__'`,"
414+
" as in the example below. A step's\nestimator may be replaced "
415+
"entirely by setting the parameter with its name\nto another "
416+
"estimator, or a transformer removed by setting it to\n"
417+
"`'passthrough'` or `None`."
418+
)
419+
elif version.parse(sklearn.__version__) >= version.parse("0.21.0"):
403420
fixture_description = (
404421
"Pipeline of transforms with a final estimator.\n\nSequentially"
405422
" apply a list of transforms and a final estimator.\n"
@@ -489,7 +506,24 @@ def test_serialize_pipeline_clustering(self):
489506
)
490507
fixture_short_name = "sklearn.Pipeline(StandardScaler,KMeans)"
491508

492-
if version.parse(sklearn.__version__) >= version.parse("0.21.0"):
509+
if version.parse(sklearn.__version__) >= version.parse("1.0"):
510+
fixture_description = (
511+
"Pipeline of transforms with a final estimator.\n\nSequentially"
512+
" apply a list of transforms and a final estimator.\n"
513+
"Intermediate steps of the pipeline must be 'transforms', that "
514+
"is, they\nmust implement `fit` and `transform` methods.\nThe final "
515+
"estimator only needs to implement `fit`.\nThe transformers in "
516+
"the pipeline can be cached using ``memory`` argument.\n\nThe "
517+
"purpose of the pipeline is to assemble several steps that can "
518+
"be\ncross-validated together while setting different parameters"
519+
". For this, it\nenables setting parameters of the various steps"
520+
" using their names and the\nparameter name separated by a `'__'`,"
521+
" as in the example below. A step's\nestimator may be replaced "
522+
"entirely by setting the parameter with its name\nto another "
523+
"estimator, or a transformer removed by setting it to\n"
524+
"`'passthrough'` or `None`."
525+
)
526+
elif version.parse(sklearn.__version__) >= version.parse("0.21.0"):
493527
fixture_description = (
494528
"Pipeline of transforms with a final estimator.\n\nSequentially"
495529
" apply a list of transforms and a final estimator.\n"

0 commit comments

Comments
 (0)