1 OptunaConfig

configs.OptunaConfig()

Configure an Optuna study used by aria_nbv.lightning.AriaNBVExperimentConfig.

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.2 Methods

Name Description
setup_target Create or load an Optuna study.
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.2.1 setup_target

configs.OptunaConfig.setup_target()

Create or load an Optuna study.

1.2.2 setup_optimizables

configs.OptunaConfig.setup_optimizables(
    experiment_config,
    trial,
    *,
    console=None,
)

Apply Optimizable hints embedded in the config tree.

1.2.3 log_to_wandb

configs.OptunaConfig.log_to_wandb()

Send the most recent suggestions to W&B.

1.2.4 get_pruning_callback

configs.OptunaConfig.get_pruning_callback(trial)

Return a PyTorch Lightning pruning callback for the configured monitor.