Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Isaac sim IsaacGymEnvs Launch Rlg Hydra Inference

From Leeroopedia
Revision as of 13:07, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Isaac_sim_IsaacGymEnvs_Launch_Rlg_Hydra_Inference.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Sources Domains Last Updated
IsaacGymEnvs, train.py Configuration, Inference 2026-02-15 00:00 GMT

Overview

The concrete entry point and dispatch logic within train.py that routes execution to inference (play) mode when test=True is specified.

Description

The same launch_rlg_hydra(cfg) function used for training also handles the inference path. When cfg.test is True, the function constructs a run configuration dict with train=False and play=True, passing the checkpoint path and sigma override to the Runner.

Usage

Invoked via CLI with test=True and a checkpoint path. The Hydra config composition resolves all task/train parameters identically to training mode.

Code Reference

Source Location: Repository: NVIDIA-Omniverse/IsaacGymEnvs, File: isaacgymenvs/train.py (L71-72 hydra entry, L202-215 test/play dispatch)

Signature:

def launch_rlg_hydra(cfg: DictConfig):
    """Main entry point - handles both training and inference."""
    # ... config setup, environment creation, runner building ...

    # Test/play dispatch (L202-215):
    if cfg.test:
        runner.run({
            'train': False,
            'play': True,
            'checkpoint': cfg.checkpoint,
            'sigma': cfg.sigma
        })
    else:
        runner.run({
            'train': True,
            'play': False
        })

CLI Invocation:

python train.py test=True checkpoint=<path> task=<TaskName> num_envs=<N>

I/O Contract

Inputs:

Parameter Type Required Description
cfg.test bool Yes Must be True to trigger inference path
cfg.checkpoint str Yes Path to the .pth checkpoint file
cfg.task str Yes Task name (e.g., Cartpole, Ant, Humanoid)
cfg.sigma float No Override for exploration noise; None uses model default
cfg.num_envs int No Number of parallel environments for inference

Outputs:

  • Config dict that triggers play mode in Runner
  • Runner dispatches to the registered Player class for the given algorithm

Usage Examples

Example 1 -- Basic inference with a trained Ant policy:

python train.py test=True checkpoint=runs/Ant/nn/Ant.pth task=Ant num_envs=64

Example 2 -- Deterministic inference (zero exploration noise):

python train.py test=True checkpoint=runs/Humanoid/nn/Humanoid.pth task=Humanoid sigma=0.0

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment