paroto.io.stone_loader ====================== .. py:module:: paroto.io.stone_loader .. autoapi-nested-parse:: Load and instantiate architectures from STONE format YAML files. Functions --------- .. autoapisummary:: paroto.io.stone_loader.load_stone_config paroto.io.stone_loader.create_problem_from_stone paroto.io.stone_loader.get_default_values_from_stone Module Contents --------------- .. py:function:: load_stone_config(yaml_path) Load STONE format configuration from YAML file. :param yaml_path: Path to STONE format YAML file :type yaml_path: :py:class:`str` :returns: **config** -- Configuration dictionary :rtype: :py:class:`dict` :raises ValueError: If file is not in STONE format .. py:function:: create_problem_from_stone(yaml_path) Create OpenMDAO problem from STONE format configuration. Dynamically instantiates systems based on types specified in the YAML config. :param yaml_path: Path to STONE format YAML file :type yaml_path: :py:class:`str` :returns: **prob** -- Configured OpenMDAO problem :rtype: :py:class:`om.Problem` .. rubric:: Examples >>> prob = create_problem_from_stone("config_example.yml") >>> prob.setup() >>> prob.run_model() .. rubric:: Notes The config can specify either: - A single top-level system (e.g., TorchDesignGroup) - Multiple subsystems to be added to the problem .. py:function:: get_default_values_from_stone(yaml_path) Extract default values for all parameters from STONE config. :param yaml_path: Path to STONE format YAML file :type yaml_path: :py:class:`str` :returns: **defaults** -- Dictionary mapping variable names to default values :rtype: :py:class:`dict`