Skip to content

Feature/upgrade optuna 4.2.1 #3046

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 2 commits into
base: main
Choose a base branch
from

Conversation

dahlem
Copy link

@dahlem dahlem commented Mar 31, 2025

Upgrade hydra_optuna_sweeper to Optuna 4.2.1

Summary

This PR upgrades the hydra_optuna_sweeper plugin to use Optuna 4.2.1 (from 3.0.0) and updates the code to comply with the latest
Optuna APIs, replacing deprecated distribution classes and methods.

Changes

  • Replace deprecated distribution classes with modern equivalents:
    • DiscreteUniformDistributionFloatDistribution with step parameter
    • IntUniformDistribution, IntLogUniformDistributionIntDistribution
    • UniformDistribution, LogUniformDistributionFloatDistribution
  • Update Trial API usage to public methods instead of internal ones
  • Update sampler configurations to remove deprecated parameters
  • Update tests to reflect the new distribution classes
  • Add news entry (enable python3.10 CI for Windows #2444)

Test Plan

  • Unit tests for distribution classes and API pass
  • Example applications run successfully
  • Manual testing with different samplers and storage options

Backward Compatibility

This change maintains backward compatibility with existing configurations.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 31, 2025
@charleswilmot
Copy link

I need this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants