Update describe_pipeline to return more information about pipeline, including id for ensemble#1909
Update describe_pipeline to return more information about pipeline, including id for ensemble#1909angela97lin merged 19 commits intomainfrom
describe_pipeline to return more information about pipeline, including id for ensemble#1909Conversation
| return self._component_graph.get_component(name) | ||
|
|
||
| def describe(self): | ||
| def describe(self, return_dict=False): |
There was a problem hiding this comment.
Was missing return_dict parameter, even though it was in docstrings :p
| assert component.name in out | ||
|
|
||
| @pytest.mark.parametrize("is_linear", [True, False]) | ||
| def test_describe(is_linear, caplog, logistic_regression_binary_pipeline_class, nonlinear_binary_pipeline_class): |
There was a problem hiding this comment.
Combined test_describe and test_describe_nonlinear
| clf[:1] | ||
|
|
||
|
|
||
| def test_describe(caplog, logistic_regression_binary_pipeline_class): |
There was a problem hiding this comment.
Combined test_describe and test_describe_nonlinear and test_describe_fitted and test_describe_nonlinear_fitted
| assert pipeline.parameters == new_pipeline.parameters | ||
| for component, new_component in zip(pipeline._component_graph, new_pipeline._component_graph): | ||
| assert isinstance(new_component, type(component)) | ||
| assert pipeline.describe() == new_pipeline.describe() |
There was a problem hiding this comment.
This actually just asserts None == None lol... also doesn't make sense to test equality via describe though (name is different), so no need for this test.
| random_seeds_the_same = [(estimator.pipeline.random_seed == algo.random_seed) | ||
| for estimator in estimators_used_in_ensemble] | ||
| assert all(random_seeds_the_same) | ||
| assert ModelFamily.ENSEMBLE not in algo._best_pipeline_info |
There was a problem hiding this comment.
Confirms we don't add ensemble to _best_pipeline_info
freddyaboulton
left a comment
There was a problem hiding this comment.
@angela97lin I think this is great! I think the only thing blocking merge is that this implementation always returns the ids for the latest ensemble and not the ensemble that was asked for.
| clf[:1] | ||
|
|
||
|
|
||
| def test_describe(caplog, logistic_regression_binary_pipeline_class): |
Codecov Report
@@ Coverage Diff @@
## main #1909 +/- ##
=========================================
+ Coverage 100.0% 100.0% +0.1%
=========================================
Files 267 267
Lines 21664 21699 +35
=========================================
+ Hits 21658 21693 +35
Misses 6 6
Continue to review full report at Codecov.
|
bchen1116
left a comment
There was a problem hiding this comment.
LGTM! Just left a question for my own understanding, but nothing blocking.
freddyaboulton
left a comment
There was a problem hiding this comment.
@angela97lin Thanks for fixing! I think this is great!!
Closes #1872
IterativeAlgorithm._best_pipeline_infopipeline.describe()not havingreturn_dictparameter