Bash Command
Bash Command 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.
Usage Examples
Test TOML example:
Test Scenario example:
Test-in-Scenario example:
API Documentation
Command Arguments
class cloudai.workloads.bash_cmd.bash_cmd.BashCmdArgs(*, cmd: str, **extra_data: Any)
Bases: CmdArgs
Arguments for a Bash command.
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’,
agent_config: dict[str, Any] | None = None,
)
Bases: TestDefinition
Test definition for a Bash command.