paroto.io ========= .. py:module:: paroto.io .. autoapi-nested-parse:: I/O utilities for configuration and data. Submodules ---------- .. toctree:: :maxdepth: 1 /_api/paroto/io/config/index /_api/paroto/io/stone/index /_api/paroto/io/stone_loader/index Functions --------- .. autoapisummary:: paroto.io.create_problem_from_stone paroto.io.get_default_values_from_stone paroto.io.load_stone_config Package Contents ---------------- .. 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` .. 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