Skip to navigation

Bash Command

View as Markdown

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:

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!'"

API Documentation

Command Arguments

BashCmdArgs

Arguments for a Bash command.

FieldTypeDefaultDescription
cmdstrRequired

Test Definition

BashCmdTestDefinition

Test definition for a Bash command.

FieldTypeDefaultDescription
namestrRequired
descriptionstrRequired
test_template_namestrRequired
cmd_argscloudai.workloads.bash_cmd.bash_cmd.BashCmdArgsRequired
dse_excluded_argslist[str]Factory: list
extra_env_varsdict[str, str | typing.List[str]]{}
extra_cmd_argsdict[str, str]{}
extra_container_mountslist[str][]
git_reposlist[cloudai._core.installables.git_repo.GitRepo][]
nsyscloudai.models.workload.NsysConfiguration | NoneNone
predictorcloudai.models.workload.PredictorConfig | NoneNone
training_reportcloudai.models.workload.TrainingReportConfig | NoneNone
agentstr'grid_search'
agent_stepsint1
agent_metricslist[str]['default']
agent_reward_functionstr'inverse'
agent_configdict[str, Any] | NoneNoneAgent configuration.
env_paramsdict[str, cloudai.configurator.env_params.EnvParamSpec]Factory: dictEnvironment parameters sampled by the env per trial. Sibling to cmd_args; not part of the agent’s action space. CloudAIGymEnv samples, persists them in the trajectory output, and includes them in the trajectory cache key.