ENH improve HTML display of FunctionTransformer#29158
Merged
thomasjpfan merged 9 commits intoscikit-learn:mainfrom Jul 21, 2024
Merged
ENH improve HTML display of FunctionTransformer#29158thomasjpfan merged 9 commits intoscikit-learn:mainfrom
FunctionTransformer#29158thomasjpfan merged 9 commits intoscikit-learn:mainfrom
Conversation
Member
|
I like the idea! |
Contributor
Author
|
I'm not sure why codecov is failing for this PR. The only uncovered lines in the report did not seem related to this PR, or should I fix the partially covered lines as well? |
Contributor
Author
|
@timvink @glemaitre Would you want to take a look at this one? |
Contributor
|
Yes this look great ! |
Member
|
Merge conflict, also, maybe @lesteve could have a look here? |
Contributor
Author
|
Changelog conflict, resolved :) |
thomasjpfan
approved these changes
Jul 20, 2024
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Small nit, otherwise LGTM
Contributor
Author
|
Thanks for the review @thomasjpfan; comment resolved in 77d2a24 |
MarcBresson
pushed a commit
to MarcBresson/scikit-learn
that referenced
this pull request
Sep 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #29032.
Main changes explained
captionfield to the label which is the smaller, grayed text shown below the name.FunctionTransformerin thenamefield by the function name and display the estimator name in caption; the function name isest.func.__name__, orest.func.func.__name__(forfunctools.partial), or{est.func.__class__.__name__}(...).Documentation to {xxx}tooltip to show something other thanxxx=name; this is needed in this case becausenameis not the estimator name now.This is more or less still a draft solution so discussions/suggestions welcome.
Testing this PR
In a notebook:
The above would render: