skillfed

hydra-optuna-sweeper

Hydra Optuna Sweeper plugin

hydra-optuna-sweeper v1.2.0 129.6K downloads/30d#11,665 on PyPI10,596
Permissive license Active released

What it is and what it does

hydra-optuna-sweeper is a plugin that bridges Hydra's configuration management system with Optuna's hyperparameter optimization library. It allows you to define complex application configurations in Hydra and then use Optuna's sophisticated sampling algorithms (including Bayesian optimization and pruning strategies) to search the parameter space automatically.

The plugin works by extending Hydra's sweeper interface, letting you specify optimization objectives and constraints declaratively in your configuration files rather than writing custom optimization loops. This is particularly useful for machine learning workflows, experiment management, and any scenario where you need to systematically explore parameter combinations guided by an optimization algorithm rather than simple grid or random search.

Use it for:

  • Tune neural network hyperparameters (learning rate, batch size, layer sizes) in ML training pipelines using Bayesian optimization.
  • Optimize application configuration parameters for performance or resource usage with Optuna's pruning to stop unpromising trials early.
  • Run systematic hyperparameter searches in Hydra-based experiment frameworks without writing custom optimization code.
  • Integrate Optuna's advanced sampling strategies into existing Hydra applications to replace grid or random sweeps.
  • Manage multi-objective optimization where Hydra configs define the search space and Optuna handles the algorithm.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates Optuna hyperparameter optimization into Hydra's configuration framework, enabling sweeps over application parameters using Optuna's sampling and pruning strategies.

Yes, if you are already using Hydra for configuration management and want to add Optuna-powered hyperparameter optimization. The low install friction, active maintenance status, and permissive MIT license make it a straightforward addition. However, verify that this version is compatible with your target Hydra release (1.3 stable or 1.4 development) before committing, given the 2022 release date.

Install

hydra-optuna-sweeper on PyPI

pip

pip install hydra-optuna-sweeper

uv

uv add hydra-optuna-sweeper

poetry

poetry add hydra-optuna-sweeper

Installing hydra-optuna-sweeper

Before you install

Low friction install with just two runtime dependencies (hydra-core and optuna). The package is actively maintained with recent commits, though the latest release was in 2022; it remains part of the active Hydra ecosystem following the 2026 transition to independent stewardship.

License in practice

MIT-licensed under permissive terms, so you can use it freely in commercial and private projects without restriction or attribution requirement.

Quickstart

pip install hydra-optuna-sweeper

from hydra import compose, initialize
from hydra.core.config_store import ConfigStore

# Configure Optuna sweeper in your Hydra config
# Then use: python app.py --multirun hydra/sweeper=optuna

Requires hydra-core and optuna to be installed; Hydra configuration files must be set up to reference the Optuna sweeper plugin.

Verify before relying

  • Whether the 2022 release date indicates the plugin is feature-complete or awaiting updates for Hydra 1.4.
  • Specific Optuna versions supported by this plugin version.
  • Whether this plugin works with both Hydra 1.3 (stable) and 1.4 (development).

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — hydra-core, optuna
Maintenance actively maintained — 1,550 days since the last release
Last repo commit
First released
Downloads 129,571/month — #11,665 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: hydra_optuna_sweeper-1.2.0-py3-none-any.whl

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

hydra hyperparameter optimizationoptuna sweeper pluginhydra parameter sweepbayesian hyperparameter tuningoptuna integration hydraconfiguration-driven optimizationautomated parameter search
hyperparameter-optimizationhydra-pluginbayesian-search

More Artificial Intelligence packages

Further reading