nemo_gym.orchestration.executors.slurm_script

View as Markdown

Module Contents

Functions

NameDescription
_build_ray_command-
_build_vllm_command-
_render_directives-
_render_pool_directives-
_render_service_command-
_resolve_envReturn an ‘env K=V …’ prefix string (trailing space) scoped to a single command, or ” if empty.
_validate_env_key-
build_sbatch_script-

Data

_BUILDERS

_SCRIPT_TEMPLATE

_VALID_ENV_KEY

API

nemo_gym.orchestration.executors.slurm_script._build_ray_command(
_service: nemo_gym.orchestration.api.RayServiceConfig
) -> str
nemo_gym.orchestration.executors.slurm_script._build_vllm_command(
service: nemo_gym.orchestration.api.VllmServiceConfig
) -> str
nemo_gym.orchestration.executors.slurm_script._render_directives(
compute: nemo_gym.orchestration.api.SlurmComputeConfig,
remote_bench_dir: pathlib.Path,
benchmark_name: str
) -> str
nemo_gym.orchestration.executors.slurm_script._render_pool_directives(
pool_name: str,
pool: nemo_gym.orchestration.api.NodePool
) -> list[str]
nemo_gym.orchestration.executors.slurm_script._render_service_command(
name: str,
container: str,
command: str,
env: dict[str, str] | None = None,
mounts: list[str] | None = None
) -> str
nemo_gym.orchestration.executors.slurm_script._resolve_env(
env: dict[str, str]
) -> str

Return an ‘env K=V …’ prefix string (trailing space) scoped to a single command, or ” if empty.

nemo_gym.orchestration.executors.slurm_script._validate_env_key(
key: str
) -> None
nemo_gym.orchestration.executors.slurm_script.build_sbatch_script(
config: nemo_gym.orchestration.api.SubmitConfig,
benchmark_name: str,
benchmark: nemo_gym.orchestration.api.BenchmarkRunConfig,
compute: nemo_gym.orchestration.api.SlurmComputeConfig,
remote_bench_dir: pathlib.Path
) -> str
nemo_gym.orchestration.executors.slurm_script._BUILDERS = {VllmServiceConfig: _build_vllm_command, RayServiceConfig: _build_ray_command}
nemo_gym.orchestration.executors.slurm_script._SCRIPT_TEMPLATE = '#!/bin/bash\n{directives}\n\n{service_commands}\n\n{health_checks}\n\n{prepare_...
nemo_gym.orchestration.executors.slurm_script._VALID_ENV_KEY = re.compile('^[A-Za-z_][A-Za-z0-9_]*$')