config
config
¶
Backward-compatibility shim -- optimize.config moved to learning.optimize.config.
Functions¶
load_optimize_config
¶
Load an optimization config TOML file.
Returns the raw dict with keys such as optimize.max_trials,
optimize.benchmark, optimize.search, optimize.fixed,
optimize.constraints, etc.
Raises: FileNotFoundError: If path does not exist.
Source code in src/openjarvis/learning/optimize/config.py
load_objectives
¶
load_objectives(data: Dict[str, Any]) -> List[ObjectiveSpec]
Extract objectives from a loaded optimization config.
Reads optimize.objectives (a list of tables) and returns
a list of :class:ObjectiveSpec. Falls back to
:data:DEFAULT_OBJECTIVES if the key is absent.
Source code in src/openjarvis/learning/optimize/config.py
load_benchmark_specs
¶
Extract benchmark specs from a loaded optimization config.
Supports two formats:
- Multi-benchmark: [[optimize.benchmarks]] array of tables
- Single-benchmark fallback: optimize.benchmark string
Returns a list of :class:BenchmarkSpec (from trial_runner).
Returns an empty list if no benchmarks are configured (caller
should fall back to CLI --benchmark).