Skip to content

Commit

Permalink
Add an assertion in topk_voting_classifier's get_pipeline implementation
Browse files Browse the repository at this point in the history
to verify that the result is a Pipeline before calling export_to_sklearn_pipeline on it.

This assertion should be removed once Operator supports get_pipeline, as per #544
  • Loading branch information
shinnar committed Dec 3, 2020
1 parent e403989 commit c83beb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lale/lib/lale/topk_voting_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def get_pipeline(self, pipeline_name=None, astype="lale"):
if result is None or astype == "lale":
return result
assert astype == "sklearn", astype
assert isinstance(result, lale.operators.BasePipeline)
return result.export_to_sklearn_pipeline()


Expand Down

0 comments on commit c83beb1

Please sign in to comment.