1 configs.optuna_config
configs.optuna_config
Optuna study construction and config-tree search-space application.
This module owns the optional Optuna boundary for ARIA-NBV experiments. It maps :class:Optimizable field metadata onto trials while experiment execution and metric reporting remain owned by aria_nbv.lightning.
1.1 Classes
| Name | Description |
|---|---|
| OptunaConfig | Configure an Optuna study used by aria_nbv.lightning.AriaNBVExperimentConfig. |
1.1.1 OptunaConfig
configs.optuna_config.OptunaConfig()Configure an Optuna study used by aria_nbv.lightning.AriaNBVExperimentConfig.
1.1.1.1 Attributes
| Name | Description |
|---|---|
| study_name | Study name (used for Optuna storage and W&B grouping). |
| direction | Optuna optimization direction. |
| n_trials | Number of Optuna trials to run. |
| monitor | Metric key to optimize (must be present in the Lightning trainer metrics). |
| load_if_exists | Re-use an existing study with the same name when True. |
| sampler | Optuna sampler choice. |
| pruner | Optuna pruner choice. |
| suggested_params | Latest trial suggestions applied to the config tree (W&B friendly). |
1.1.1.2 Methods
| Name | Description |
|---|---|
| setup_target | Create or resume the configured study in the project SQLite store. |
| setup_optimizables | Apply Optimizable hints embedded in the config tree. |
| log_to_wandb | Send the most recent suggestions to W&B. |
| get_pruning_callback | Return a PyTorch Lightning pruning callback for the configured monitor. |
1.1.1.2.1 setup_target
configs.optuna_config.OptunaConfig.setup_target()Create or resume the configured study in the project SQLite store.
1.1.1.2.2 setup_optimizables
configs.optuna_config.OptunaConfig.setup_optimizables(
experiment_config,
trial,
*,
console=None,
)Apply Optimizable hints embedded in the config tree.
1.1.1.2.3 log_to_wandb
configs.optuna_config.OptunaConfig.log_to_wandb()Send the most recent suggestions to W&B.
1.1.1.2.4 get_pruning_callback
configs.optuna_config.OptunaConfig.get_pruning_callback(trial)Return a PyTorch Lightning pruning callback for the configured monitor.