Bash Command
This workload (test_template_name is BashCmd) allows users to execute arbitrary bash commands within the CloudAI framework. This is useful for simple scripts, custom testing commands, or integrating external tools.
cmd specified in the cmd_args section will be added as-is into generated sbatch script.
Test TOML example:
name = "my_bash_test"
description = "Example bash command test"
test_template_name = "BashCmd"
[cmd_args]
cmd = "echo 'Hello from CloudAI!'"
Test Scenario example:
name = "bash-test"
[[Tests]]
id = "bash.1"
num_nodes = 1
time_limit = "00:05:00"
test_name = "my_bash_test"
Test-in-Scenario example:
name = "bash-test"
[[Tests]]
id = "bash.1"
num_nodes = 1
time_limit = "00:05:00"
name = "my_bash_test"
description = "Example bash command test"
test_template_name = "BashCmd"
[Tests.cmd_args]
cmd = "echo 'Hello from CloudAI!'"
Command Arguments
- class cloudai.workloads.bash_cmd.bash_cmd.BashCmdArgs(*, cmd: str, **extra_data: Any)[source]
Bases:
CmdArgsArguments for a Bash command.
- cmd: str
Test Definition
- class cloudai.workloads.bash_cmd.bash_cmd.BashCmdTestDefinition(*, name: str, description: str, test_template_name: str, cmd_args: BashCmdArgs, 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')[source]
Bases:
TestDefinitionTest definition for a Bash command.
- cmd_args: BashCmdArgs
- property installables: list[Installable]