create_workflow
Define a SLURM workflow YAML with job DAG, dependencies, resources, and templating. Execute via run_workflow.
Instructions
Create a SLURM workflow YAML file.
Generates a YAML workflow definition that can be executed with run_workflow.
Each job in the workflow can depend on other jobs, forming a DAG.
Args:
name: Workflow name for identification
jobs: List of job definitions. Each job dict should contain:
- name (required): Job identifier
- command (required for regular jobs): Command as string or list of strings
- script_path (required for shell jobs): Path to shell script
- depends_on: List of job names this job depends on (e.g. ["preprocess"])
Supports dependency types: "afterok:job_a", "after:job_a", "afterany:job_a"
- retry: Number of retry attempts on failure (default 0)
- retry_delay: Seconds between retries (default 60)
- resources: Dict with nodes, gpus_per_node, ntasks_per_node,
cpus_per_task, memory_per_node, time_limit, partition, nodelist
- environment: Dict with conda, venv, env_vars, container
- log_dir: Log directory path
- work_dir: Working directory path
output_path: File path to write the YAML workflow (e.g. "workflow.yaml")
args: Optional template variables for Jinja2 templating in job definitions
default_project: Default SSH project/mount name for file syncingInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| jobs | Yes | ||
| output_path | Yes | ||
| args | No | ||
| default_project | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||