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

Edit components API to match other modules #747

Merged
merged 13 commits into from May 7, 2020
Merged

Conversation

jeremyliweishih
Copy link
Contributor

@jeremyliweishih jeremyliweishih commented May 6, 2020

Fixes #742.

@codecov
Copy link

codecov bot commented May 6, 2020

Codecov Report

Merging #747 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #747   +/-   ##
=======================================
  Coverage   99.34%   99.34%           
=======================================
  Files         148      148           
  Lines        5175     5175           
=======================================
  Hits         5141     5141           
  Misses         34       34           
Impacted Files Coverage Δ
evalml/pipelines/components/component_base.py 94.11% <ø> (ø)

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 c6f3858...e8a30b8. Read the comment docs.

@@ -124,57 +124,26 @@ Pipeline Plot Utils
Components
==========

Transformers
Copy link
Contributor Author

@jeremyliweishih jeremyliweishih May 6, 2020

Choose a reason for hiding this comment

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

I removed all the subheadings because I thought they were unnecessary and cluttered the API reference.

Copy link
Collaborator

@dsherry dsherry May 7, 2020

Choose a reason for hiding this comment

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

Got it. I know this was added recently; I could see both sides. But I think what you've got here is good. We don't offer any one-sentence summaries elsewhere in the API doc. And right now, we don't have a ton of components, so perhaps the extra level of organization is unnecessary as you said. If we add enough components to warrant further editing here, I'll be pretty excited! 😂

Copy link
Contributor

@kmax12 kmax12 May 7, 2020

Choose a reason for hiding this comment

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

i personally really liked the added info and structure, but we can add it back later once we have more components since it does feel a little empty with just one component per category.

I like it because it makes the api reference slightly more educational

Copy link
Contributor Author

@jeremyliweishih jeremyliweishih May 7, 2020

Choose a reason for hiding this comment

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

If we're thinking of adding them back later might be prudent just to keep them there so we don't have to recreate the work! Mainly just thought it looked weird cause there were a lot of text for one class and it wasn't done anywhere else.

Copy link
Collaborator

@dsherry dsherry May 7, 2020

Choose a reason for hiding this comment

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

Hmm, good point @kmax12 . Perhaps we can find middle ground.

I'd advocate for deleting the categorization of components by type, but still keeping the high-level headings and one-sentence summaries.

So, to be specific:

  • "Component Base Classes" section with ComponentBase, Transformer and Estimator, and with a one-sentence description of what components are.
  • "Transformers" section with a one-sentence description of what transformers are.
  • "Estimators" section with "Classifiers" and "Regressors" sub-sections, and a one-sentence description for each of those.

@jeremyliweishih does that sound good to you too?

@jeremyliweishih jeremyliweishih marked this pull request as ready for review May 6, 2020
@jeremyliweishih jeremyliweishih requested a review from dsherry May 6, 2020

Imputers
--------
ComponentBase
Copy link
Collaborator

@dsherry dsherry May 7, 2020

Choose a reason for hiding this comment

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

Can we list Transformer and Estimator here too?

@@ -7,6 +7,8 @@


class ComponentBase(ABC):
"Base class for all components"
Copy link
Collaborator

@dsherry dsherry May 7, 2020

Choose a reason for hiding this comment

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

Nice

dsherry
dsherry approved these changes May 7, 2020
Copy link
Collaborator

@dsherry dsherry left a comment

LGTM! I do have one request: I think we should list Transformer and Estimatorunder theComponent Base Classes` heading.

@dsherry
Copy link
Collaborator

dsherry commented May 7, 2020

@jeremyliweishih : RTD failed with this:

Warning, treated as error:
/home/docs/checkouts/readthedocs.org/user_builds/feature-labs-inc-evalml/envs/js_742_api/lib/python3.7/site-packages/evalml/pipelines/components/estimators/estimator.py:docstring of evalml.pipelines.components.Estimator.name:12:Unexpected indentation.

Oh, and now I see build_docs failed too. Cool, lol

@jeremyliweishih
Copy link
Contributor Author

jeremyliweishih commented May 7, 2020

@dsherry yeah! Trying to fix it.

@jeremyliweishih jeremyliweishih requested a review from dsherry May 7, 2020
@jeremyliweishih
Copy link
Contributor Author

jeremyliweishih commented May 7, 2020

@dsherry I added to the descriptions. Lmk what you think!

docs/source/api_reference.rst Outdated Show resolved Hide resolved
docs/source/api_reference.rst Outdated Show resolved Hide resolved
docs/source/api_reference.rst Outdated Show resolved Hide resolved
@dsherry
Copy link
Collaborator

dsherry commented May 7, 2020

@jeremyliweishih looks great! I left some suggested tweaks.

@jeremyliweishih jeremyliweishih merged commit 7357bcb into master May 7, 2020
2 checks passed
@dsherry dsherry deleted the js_742_api branch Oct 29, 2020
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.

ComponentBase missing from API reference
3 participants