Slurm Container#
This workload (test_template_name is SlurmContainer
) executes containerized workloads using Slurm with custom container configurations.
Usage Example#
Test TOML example:
name = "my_container_test"
description = "Example Slurm container test"
test_template_name = "SlurmContainer"
[cmd_args]
image_path = "/path/to/container.sqsh"
cmd = "python train.py"
Test Scenario example:
name = "slurm-container-test"
[[Tests]]
id = "container.1"
num_nodes = 2
time_limit = "01:00:00"
test_name = "my_container_test"
Test-in-Scenario example:
name = "slurm-container-test"
[[Tests]]
id = "container.1"
num_nodes = 2
time_limit = "01:00:00"
name = "my_container_test"
description = "Example Slurm container test"
test_template_name = "SlurmContainer"
[Tests.cmd_args]
image_path = "/path/to/container.sqsh"
cmd = "python train.py"
API Documentation#
Command Arguments#
Test Definition#
- class cloudai.workloads.slurm_container.slurm_container.SlurmContainerTestDefinition(
- *,
- name: str,
- description: str,
- test_template_name: str,
- cmd_args: SlurmContainerCmdArgs,
- extra_env_vars: dict[str, str | List[str]] = {},
- extra_cmd_args: dict[str, str] = {},
- extra_container_mounts: list[str] = [],
- git_repos: list[GitRepo] = [],
- nsys: NsysConfiguration | None = None,
- predictor: PredictorConfig | None = None,
- agent: str = 'grid_search',
- agent_steps: int = 1,
- agent_metrics: list[str] = ['default'],
- agent_reward_function: str = 'inverse',
- extra_srun_args: list[str] = None,
- scripts: list[File] = None,
Bases:
TestDefinition
Test definition for a generic Slurm container test.
- cmd_args: SlurmContainerCmdArgs#
- extra_srun_args: list[str]#
- scripts: list[File]#
- property docker_image: DockerImage#
- property installables: list[Installable]#
- property extra_args_str: str#