Skip to content

BUG Ignores tags when estimator is a class in parametrize_with_checks #16709

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

Merged
merged 10 commits into from
Mar 18, 2020

Conversation

thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented Mar 16, 2020

Reference Issues/PRs

Fixes #16707

What does this implement/fix? Explain your changes.

Ignores the tags when estimator is a class in parametrize_with_checks

CC @rth

@NicolasHug
Copy link
Member

It doesn't seem natural to me to ignore the tags when we pass a class

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.

LGTM, thanks @thomasjpfan !

# try to construct estimator to get tags, if it is unable to then
# return the estimator class
try:
xfail_checks = _safe_tags(_construct_instance(estimator),
Copy link
Member

Choose a reason for hiding this comment

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

_construct_instance is potentially costly, but I also don't see a way around it.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not concerned given our conventions

@jnothman jnothman merged commit a203b9e into scikit-learn:master Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function parametrize_with_checks does not accept classes
4 participants