strategies.sample_params_from_trial

strategies.sample_params_from_trial(
    trial,
    config_params,
    file_params,
    compound_params=None,
)

Sample parameters from an Optuna trial.

Called by run_adaptive_sweep() to get parameter suggestions from Optuna.

Parameters

Name Type Description Default
trial Any Optuna trial object. required
config_params list[ConfigSweepParameter] Configuration parameters to sample. required
file_params list[FileSweepParameter] File parameters to sample. required
compound_params list[CompoundSweepParameter] | None Compound parameters to sample (picks one scenario per compound). None

Returns

Name Type Description
dict[str, Any] Dict of sampled parameter values, matching the format from expand().