Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename _name to custom_name for pipelines #650

Merged
merged 8 commits into from Apr 15, 2020
Merged

Conversation

jeremyliweishih
Copy link
Contributor

@jeremyliweishih jeremyliweishih commented Apr 15, 2020

fixes #533.

@jeremyliweishih jeremyliweishih self-assigned this Apr 15, 2020
@codecov
Copy link

codecov bot commented Apr 15, 2020

Codecov Report

Merging #650 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #650   +/-   ##
=======================================
  Coverage   98.97%   98.97%           
=======================================
  Files         136      136           
  Lines        4692     4694    +2     
=======================================
+ Hits         4644     4646    +2     
  Misses         48       48           
Impacted Files Coverage Δ
...l/pipelines/classification/random_forest_binary.py 100.00% <100.00%> (ø)
...pelines/classification/random_forest_multiclass.py 100.00% <100.00%> (ø)
evalml/pipelines/classification/xgboost_binary.py 100.00% <100.00%> (ø)
...lml/pipelines/classification/xgboost_multiclass.py 100.00% <100.00%> (ø)
evalml/pipelines/pipeline_base.py 98.25% <100.00%> (ø)
evalml/pipelines/regression/random_forest.py 100.00% <100.00%> (ø)
evalml/tests/pipeline_tests/test_pipelines.py 99.64% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3f0a26...bd25602. Read the comment docs.

@jeremyliweishih
Copy link
Contributor Author

Documentation doesn't clearly show that custom_name alters name. This is tracked in #652.

@jeremyliweishih jeremyliweishih marked this pull request as ready for review April 15, 2020 14:21
@@ -230,7 +230,7 @@ class TestNamePipeline(PipelineBase):
supported_problem_types = ['binary']

class TestDefinedNamePipeline(PipelineBase):
_name = "Cool Logistic Regression"
custom_name = "Cool Logistic Regression"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the only usage of custom_name in our unit tests? That's surprising. Could you double-check that we have adequate coverage? For example we could add a test here which calls assert TestDefinedNamePipeline.custom_name == "Cool Logistic Regression" or something. What does it show up as when we try to call pipeline.custom_name for a pipeline which doesn't define a custom name? Good to have this sort of coverage in case we change the impl in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we call for a pipeline that doesn't have custom_name it should error out. I can change it to return None.

Copy link
Contributor

@dsherry dsherry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I added a couple notes but otherwise ready to 🚢

@jeremyliweishih jeremyliweishih merged commit 9353977 into master Apr 15, 2020
@dsherry dsherry deleted the js_533_name branch October 29, 2020 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename PipelineBase._name to custom_name
2 participants