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

[MRG] Added doc on how to override estimator tags #13550

Merged
merged 4 commits into from
Apr 2, 2019

Conversation

NicolasHug
Copy link
Member

Reference Issues/PRs

Closes #13374

What does this implement/fix? Explain your changes.

  • Add whatsnew entry about estimator tags
  • Explain how to override tags in a child class (_more_tags wasn't mentioned anywhere)

Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

Thanks. Another thing we should do is reference relevant tags in error messages raised by estimator checks.

@@ -553,3 +553,8 @@ These changes mostly affect library developers.
when `fit` is called twice with the same data, the ouput of
`predict`, `predict_proba`, `transform`, and `decision_function` does not
change. :issue:`12328` by :user:`Nicolas Hug <NicolasHug>`

- Add estimators tags: these are annotations of estimators that allow
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this belongs in "Multiple modules" and the comment here should be that some checks will now be run selectively depending on the estimator's tags


- Add estimators tags: these are annotations of estimators that allow
programmatic inspection of their capabilities, such as sparse matrix
support, supported output types and supported methods.
Copy link
Member

Choose a reason for hiding this comment

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

reference the user guie

@NicolasHug
Copy link
Member Author

Thanks for the review Joel. Should this be labeled as |MajorFeature|?

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

Looks good.

I agree that error messages could also be improved but maybe in a separate PR?

- Add estimators tags: these are annotations of estimators that allow
programmatic inspection of their capabilities, such as sparse matrix
support, supported output types and supported methods. The estimators checks
are now run selectively, depending on the estimator's tags. Read more in the
Copy link
Member

@rth rth Apr 1, 2019

Choose a reason for hiding this comment

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

This may sounds a bit confusing, as estimator checks were always run selectively. Maybe,

Estimator tags also determine tests that are run on an estimator when `check_estimator` is called.

@@ -542,6 +542,12 @@ Multiple modules
- |Efficiency| Memory copies are avoided when casting arrays to a different
dtype in multiple estimators. :issue:`11973` by :user:`Roman Yurchak
<rth>`.
- Add estimators tags: these are annotations of estimators that allow
Copy link
Member

Choose a reason for hiding this comment

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

- |MajorFeature|?

Copy link
Member

Choose a reason for hiding this comment

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

Could just be feature in terms of user impact. It's a major achievement on our part

@qinhanmin2014 qinhanmin2014 merged commit 277bf27 into scikit-learn:master Apr 2, 2019
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Apr 25, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
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.

Estimator tags not in what's new
4 participants