Skip to content

Strategy to forward prefix parameter when creating blocks #2

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 1 commit into from
Mar 4, 2025

Conversation

glemaitre
Copy link

After a couple of hours looking at the code, I thought that it might be possible to keep track of the parameter prefixes (e.g. pipeline__ridge__***) during the recursive call to _write_estimator_html. To be honest, I got help from an Claude to do so :)

So we should extensively test it and look at the diff to know if it the right way to go.

But at least the changes look OK for the moment. I will check if works with string, meta-estimator and column transformer.

Copy link

github-actions bot commented Mar 3, 2025

❌ Linting issues

This PR is introducing linting issues. Here's a summary of the issues. Note that you can avoid having linting issues by enabling pre-commit hooks. Instructions to enable them can be found here.

You can see the details of the linting issues under the lint job here


ruff

ruff detected issues. Please run ruff check --fix --output-format=full . locally, fix the remaining issues, and push the changes. Here you can see the detected issues. Note that the installed ruff version is ruff=0.5.1.


sklearn/utils/_get_params_html_repr.py:87:89: E501 Line too long (99 > 88)
   |
85 |                 // Get the parameter prefix from the closest toggleable content
86 |                 const toggleableContent = element.closest('.sk-toggleable__content');
87 |                 const paramPrefix = toggleableContent ? toggleableContent.dataset.paramPrefix : '';
   |                                                                                         ^^^^^^^^^^^ E501
88 |                 const fullParamName = paramPrefix ? `${paramPrefix}${text}` : text;
   |

Found 1 error.

Generated for commit: 430f6a0. Link to the linter CI: here

@DeaMariaLeon DeaMariaLeon merged commit 8b475eb into DeaMariaLeon:get-params Mar 4, 2025
5 checks passed
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.

2 participants