WorkflowConfig¶
Top-level configuration model for a simulation workflow.
Defines the root directory, simulations to run, builder logic, and aggregation strategies. Can be saved/loaded from YAML.
Bases: BaseModel
Top-level configuration model for a simulation workflow.
This class defines how simulations are structured, executed, and aggregated. It is typically serialized/deserialized to YAML for reproducible workflows.
Attributes:
Name | Type | Description |
---|---|---|
root_folder |
PathType
|
Root directory where simulation results will be saved. default: 'results' |
keep_hfss_solutions |
bool
|
If True the HFSS solution are kept (allowing for field plotting) for every iteration. Should be False as keeping all solution takes a lot of memory. default: False |
pyaedt_file_parameters |
PyaedtFileParameters
|
Configuration for how the |
simulations |
dict[str, SUPPORTED_ANALYSIS]
|
Mapping of simulation names to simulation configuration objects. Each value must be one of the supported analysis types: These are selected using a |
builder |
SUPPORTED_BUILDERS | None
|
Optional object used to modify the HFSS model before simulation. Supported builder types: The builder must define a |
builder_sweep |
list[DictSweep]
|
parameter sweep applied to the builder phase. each For example: `DictSweep(constants={'a':1}, parameters={'b': [1,2], 'c':[3,4]}, strategy='product') --> {'a': 1, 'b': 1, 'c': 3} --> {'a': 1, 'b': 1, 'c': 4} --> {'a': 1, 'b': 2, 'c': 3} --> {'a': 1, 'b': 2, 'c': 4} ` |
aggregation_dict |
dict[str, list[str]]
|
Optional aggregation rules for result post-processing. Each key maps to a list of strings which should be all simulation identifiers.
This dict is converted to See |
load_from_yaml
classmethod
¶
Load a workflow configuration from a YAML file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str | Path
|
Source file path. |
required |
Returns:
Name | Type | Description |
---|---|---|
WorkflowConfig |
WorkflowConfig
|
Parsed configuration object. |
Source code in src/quansys/workflow/config.py
save_to_yaml ¶
Save this configuration to a YAML file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str | Path
|
Target file path. |
required |