Skip to content

Enhance ValidationCurveDisplay for categorical parameters #31043

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kaekkr
Copy link

@kaekkr kaekkr commented Mar 21, 2025

Reference Issues/PRs

Fixes #28536
See also the discussion in ValidationCurveDisplay can't handle categorical parameters.

What does this implement/fix? Explain your changes.

This PR enhances the ValidationCurveDisplay to support categorical parameters. Previously, it only worked with numerical hyperparameters, causing errors when string-based parameters were used. The update introduces:

  • Automatic detection of categorical values.
  • A new plotting method using bar plots for categorical parameters instead of line plots.
  • Improved error handling for mixed parameter types.

Any other comments?

  • Feedback on implementation details is welcome.

Copy link

github-actions bot commented Mar 21, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 739b76d. Link to the linter CI: here

@Rishab260
Copy link
Contributor

❌ 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

black

black detected issues. Please run black . locally and push the changes. Here you can see the detected issues. Note that running black might also fix some of the issues which might be detected by ruff. Note that the installed black version is black=24.3.0.

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.

Generated for commit: 522e0bf. Link to the linter CI: here

Hey @kaekk, you might want to install pre-commit if you haven't already. It helps catch linting issues before they make it into your PRs.

pip install pre-commit
pre-commit install

@kaekkr kaekkr force-pushed the enhance-validation-curve-clean branch from d156c50 to bb19eab Compare March 28, 2025 09:27
@adrinjalali
Copy link
Member

@kaekkr thanks for the contribution. Please avoid force pushing to PRs. We rather have a long list of commits here, to be able to monitor progress, and we squash commits before merging anyway.

Once you're done fixing CI issues or need help, you can ping us for reviews.

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.

ValidationCurveDisplay can't handle categorical/string parameters
3 participants