Optuna HPO Support
Reusable Optuna helpers for repository-owned neural HPO studies.
- scripts.training.optuna_hpo_support.load_yaml_dictionary(input_path)[source]
Load one YAML dictionary from disk.
- Parameters:
input_path (Path)
- Return type:
dict[str, Any]
- scripts.training.optuna_hpo_support.save_yaml_dictionary(payload, output_path)[source]
Persist one YAML dictionary to disk.
- Parameters:
payload (dict[str, Any])
output_path (Path)
- Return type:
None
- scripts.training.optuna_hpo_support.clone_dictionary(payload)[source]
Clone one nested dictionary payload.
- Parameters:
payload (dict[str, Any])
- Return type:
dict[str, Any]
- scripts.training.optuna_hpo_support.resolve_nested_dictionary_value(payload, dotted_key)[source]
Resolve one nested dictionary value from a dotted key.
- Parameters:
payload (dict[str, Any])
dotted_key (str)
- Return type:
Any
- scripts.training.optuna_hpo_support.set_nested_dictionary_value(payload, dotted_key, value)[source]
Set one nested dictionary value from a dotted key.
- Parameters:
payload (dict[str, Any])
dotted_key (str)
value (Any)
- Return type:
None
- scripts.training.optuna_hpo_support.build_sqlite_storage_url(storage_path)[source]
Build one SQLite storage URL for Optuna.
- Parameters:
storage_path (Path)
- Return type:
str
- scripts.training.optuna_hpo_support.build_optuna_sampler(sampler_dictionary)[source]
Build one Optuna sampler from a small config dictionary.
- Parameters:
sampler_dictionary (dict[str, Any])
- Return type:
optuna.samplers.BaseSampler
- scripts.training.optuna_hpo_support.sample_parameter_dictionary(trial, search_space_dictionary)[source]
Sample one parameter dictionary from the configured search space.
- Parameters:
trial (optuna.trial.Trial)
search_space_dictionary (dict[str, dict[str, Any]])
- Return type:
dict[str, Any]
- scripts.training.optuna_hpo_support.apply_sampled_parameter_dictionary(base_training_config, sampled_parameter_dictionary)[source]
Apply one sampled parameter dictionary to a cloned training config.
- Parameters:
base_training_config (dict[str, Any])
sampled_parameter_dictionary (dict[str, Any])
- Return type:
dict[str, Any]