Workflow Configuration
Top-level workflow fields that must appear in the YAML file rather than a CLI override.
- vivarium.cluster_tools.dagger.config.config.REQUIRED_WORKFLOW_FIELDS = {'steps'}
Top-level workflow fields that must appear in the YAML file.
name,project,queue, andoutput_directoryare each required overall but may be provided via either the YAML or a CLI override; their presence is validated byload_workflow_config()rather than byWorkflowConfig.parse_yaml_file().
- vivarium.cluster_tools.dagger.config.config.DEFAULT_BACKUP_FREQ_SECONDS = 1800.0
Default backup frequency in seconds (30 minutes), matching
psimulate run.
- class vivarium.cluster_tools.dagger.config.config.ResourceConfig(memory_gb, project=None, queue=None, runtime='01:00:00', cores=1, hardware=None, requires_archive_node=False)[source]
Compute resource specification for a workflow step.
- Parameters:
-
hardware:
list[str] |None= None Optional list of hardware types to target (e.g.
["r650", "r650v2"]).
- classmethod from_dict(data, *, workflow_project=None, workflow_queue=None)[source]
Create a ResourceConfig from a dictionary.
Step-level values take precedence; workflow-level defaults fill in any that are absent.
- to_native_specification(job_name)[source]
Convert to a
NativeSpecificationfor Jobmon task submission.- Return type:
- Parameters:
job_name (str) – The SLURM job name for this step’s tasks.
- class vivarium.cluster_tools.dagger.config.config.ParsedStep(step_type, name, api_kwargs)[source]
A parsed workflow step ready to be passed to an interface API function.
Produced by
parse_step_from_yaml(). Holds the inputs to the matchingget_*_step_tasksfunction (inapi_kwargs) plus the step type tag used to dispatch task building and YAML serialization.
- class vivarium.cluster_tools.dagger.config.config.WorkflowConfig(name, project, queue, output_directory, default_environment, steps, max_attempts=2)[source]
Parsed and validated workflow configuration.
- Parameters:
-
output_directory:
Path Directory where workflow outputs will be stored. Both relative and absolute paths are accepted.
-
steps:
list[ParsedStep] Parsed workflow steps, each carrying the kwargs needed by the matching interface API function.
- static parse_yaml_file(path)[source]
Read and perform basic structural validation on a workflow YAML file.
Returns the
workflowdict from inside the top-level key.- Return type:
- Parameters:
path (Path) – Path to the YAML file.
- Raises:
ValueError – If the file does not contain a top-level workflow key, if required workflow-level fields are missing, or if the workflow ‘steps’ list is empty.
- Returns:
The raw workflow dictionary from the YAML file, without any further parsing or
validation.