From c83beb1b41a55698d4ed2ba8efe639496ae0acc5 Mon Sep 17 00:00:00 2001 From: Avi Shinnar Date: Wed, 2 Dec 2020 20:15:40 -0500 Subject: [PATCH] Add an assertion in topk_voting_classifier's get_pipeline implementation 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 --- lale/lib/lale/topk_voting_classifier.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lale/lib/lale/topk_voting_classifier.py b/lale/lib/lale/topk_voting_classifier.py index 3f35499c0..0786103c9 100644 --- a/lale/lib/lale/topk_voting_classifier.py +++ b/lale/lib/lale/topk_voting_classifier.py @@ -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()