paroto.io.stone_loader#

Load and instantiate architectures from STONE format YAML files.

Functions#

load_stone_config(yaml_path)

Load STONE format configuration from YAML file.

create_problem_from_stone(yaml_path)

Create OpenMDAO problem from STONE format configuration.

get_default_values_from_stone(yaml_path)

Extract default values for all parameters from STONE config.

Module Contents#

paroto.io.stone_loader.load_stone_config(yaml_path)#

Load STONE format configuration from YAML file.

Parameters:

yaml_path (str) – Path to STONE format YAML file

Returns:

config – Configuration dictionary

Return type:

dict

Raises:

ValueError – If file is not in STONE format

paroto.io.stone_loader.create_problem_from_stone(yaml_path)#

Create OpenMDAO problem from STONE format configuration.

Dynamically instantiates systems based on types specified in the YAML config.

Parameters:

yaml_path (str) – Path to STONE format YAML file

Returns:

prob – Configured OpenMDAO problem

Return type:

om.Problem

Examples

>>> prob = create_problem_from_stone("config_example.yml")
>>> prob.setup()
>>> prob.run_model()

Notes

The config can specify either: - A single top-level system (e.g., TorchDesignGroup) - Multiple subsystems to be added to the problem

paroto.io.stone_loader.get_default_values_from_stone(yaml_path)#

Extract default values for all parameters from STONE config.

Parameters:

yaml_path (str) – Path to STONE format YAML file

Returns:

defaults – Dictionary mapping variable names to default values

Return type:

dict