client.cli.workflow.resources.yaml

Workflow resources yaml command.

Classes

MutuallyExclusiveOption

Custom option class for mutually exclusive options.

Functions

yaml(→ None)

Generate resource YAML from historical usage.

Module Contents

class client.cli.workflow.resources.yaml.MutuallyExclusiveOption(*args: Any, **kwargs: Any)

Bases: click.Option

Custom option class for mutually exclusive options.

Initialize the option with mutually exclusive options list.

mutually_exclusive
handle_parse_result(ctx: click.Context, opts: Dict[str, Any], args: List[str]) Tuple[Any, List[str]]

Handle parse result and check for mutually exclusive options.

client.cli.workflow.resources.yaml.yaml(workflow_id: int | None, task_id: int | None, mem_strategy: str, core_strategy: str, runtime_strategy: str, cluster: Tuple[str, Ellipsis], output_file: str | None, stdout: bool) None

Generate resource YAML from historical usage.

Creates a resource configuration YAML file based on actual resource usage from previous runs. Requires either –workflow-id or –task-id.

b .. rubric:: Examples

# Generate YAML for workflow, print to stdout jobmon workflow resources yaml -w 12345 –stdout

# Generate YAML for specific task, save to file jobmon workflow resources yaml -t 789 -f resources.yaml

# Use max values for all metrics jobmon workflow resources yaml -w 12345 –mem-strategy max \

–core-strategy max –runtime-strategy max -f resources.yaml

# Generate for multiple clusters jobmon workflow resources yaml -w 12345 -c slurm -c dummy –stdout