Implementation:Isaac sim IsaacGymEnvs PBT Launcher
| Knowledge Sources | |
|---|---|
| Domains | Experiment_Management, Distributed_Computing |
| Last Updated | 2026-02-15 11:00 GMT |
Overview
PBT_Launcher is the CLI entry point for the Population-Based Training (PBT) experiment launcher, routing experiment execution to local process, SLURM, or NGC backends based on user configuration.
Description
The PBT launcher module provides three key functions that together form the command-line interface for launching PBT experiments. The launcher_argparser() function constructs an ArgumentParser with common arguments including --train_dir (output directory), --run (Python module defining the experiment), --backend (execution backend choice), --pause_between (delay between process launches), and --experiment_suffix. It performs a partial parse to determine the selected backend, then dynamically adds backend-specific arguments by delegating to add_slurm_args(), add_ngc_args(), or add_os_parallelism_args().
The main() function orchestrates the full launch workflow. It parses command-line arguments, dynamically imports the user-specified run module (which must define a RUN_DESCRIPTION global variable of type RunDescription), applies the experiment suffix, and dispatches to the appropriate backend runner: run() for local OS processes, run_slurm() for SLURM cluster submission, or run_ngc() for NVIDIA GPU Cloud job submission.
The module serves as the unified entry point, abstracting away the differences between local multi-process execution, SLURM-based cluster scheduling, and NGC cloud deployment. This allows researchers to define experiments once and run them across different compute environments without changing the experiment description.
Usage
Use the PBT launcher as the CLI entry point for running hyperparameter sweeps or population-based training experiments. Invoke it directly with python -m isaacgymenvs.pbt.launcher.run --run your_experiment_module --backend processes. The experiment module must define a RUN_DESCRIPTION variable that specifies the experiments, parameter grids, and base commands.
Code Reference
Source Location
- Repository: IsaacGymEnvs
- File: isaacgymenvs/pbt/launcher/run.py
- Lines: 1-74
Signature
def launcher_argparser(args) -> argparse.ArgumentParser:
def parse_args():
def main():
Import
from isaacgymenvs.pbt.launcher.run import main
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| --run | str | Yes | Fully qualified Python module name that defines RUN_DESCRIPTION
|
| --backend | str | No | Execution backend: processes (default), slurm, or ngc |
| --train_dir | str | No | Root directory for experiment outputs (default: ./train_dir)
|
| --pause_between | int | No | Seconds to pause between launching processes (default: 1) |
| --experiment_suffix | str | No | Suffix to append to experiment directory names (default: empty) |
Outputs
| Name | Type | Description |
|---|---|---|
| return code | int | 0 on success, 1 if the run module could not be imported |
Usage Examples
# Command-line usage with local process backend:
# python -m isaacgymenvs.pbt.launcher.run \
# --run isaacgymenvs.pbt.experiments.my_experiment \
# --backend processes \
# --train_dir ./train_dir \
# --num_gpus 4 \
# --max_parallel 8
# Command-line usage with SLURM backend:
# python -m isaacgymenvs.pbt.launcher.run \
# --run isaacgymenvs.pbt.experiments.my_experiment \
# --backend slurm \
# --slurm_workdir ./slurm_workdir \
# --slurm_gpus_per_job 1
# Programmatic usage:
from isaacgymenvs.pbt.launcher.run import main
exit_code = main()
Related Pages
- Isaac_sim_IsaacGymEnvs_RunDescription - Defines the experiment configurations consumed by the launcher
- Isaac_sim_IsaacGymEnvs_PBT_Process_Backend - Local OS process execution backend
- Isaac_sim_IsaacGymEnvs_PBT_Slurm_Backend - SLURM cluster execution backend
- Isaac_sim_IsaacGymEnvs_PBT_NGC_Backend - NGC cloud execution backend