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 Checkpoint Filesystem Convention

From Leeroopedia
Sources Domains Last Updated
IsaacGymEnvs, common_agent.py Persistence, Training 2026-02-15 00:00 GMT

Overview

Pattern for saving and discovering trained RL policy checkpoints following the rl_games filesystem convention within IsaacGymEnvs.

Description

The CommonAgent class in its train() method handles periodic checkpoint saving. Checkpoints are written as .pth files containing the model state_dict to a predictable directory path derived from the experiment name configured via Hydra.

Usage

Checkpoints are produced automatically during training runs and consumed when resuming training or launching inference. No explicit path configuration is required beyond specifying the experiment name.

Code Reference

Source Location: Repository: NVIDIA-Omniverse/IsaacGymEnvs, File: isaacgymenvs/learning/common_agent.py (L122-176)

Pattern:

runs/<experiment_name>/nn/<checkpoint>.pth

Checkpoint Saving Code (common_agent.py train() method):

# In CommonAgent.train():
# Periodic checkpoint saving based on save_freq
if self.epoch_num % self.save_freq == 0:
    self.save(os.path.join(self.nn_dir,
        'last_' + self.config['name'] + 'ep' + str(self.epoch_num)
        + 'rew' + str(mean_rewards)))

# Best model checkpoint saving
if mean_rewards > self.last_mean_rewards:
    self.last_mean_rewards = mean_rewards
    self.save(os.path.join(self.nn_dir, self.config['name']))

I/O Contract

Inputs:

Input Type Description
Completed training epoch Internal state Triggers checkpoint save evaluation
save_freq int How often (in epochs) to save periodic checkpoints
experiment_name str Derived from Hydra config; determines directory naming

Outputs:

Output Type Description
Best checkpoint .pth file runs/<experiment_name>/nn/<experiment_name>.pth -- saved when mean reward improves
Periodic checkpoint .pth file runs/<experiment_name>/nn/last_<name>ep<N>rew<R>.pth -- saved every save_freq epochs

Directory Layout Example

runs/
  Cartpole/
    nn/
      Cartpole.pth                     # best checkpoint
      last_Cartpoleep100rew485.3.pth   # periodic checkpoint at epoch 100
      last_Cartpoleep200rew499.1.pth   # periodic checkpoint at epoch 200
    summaries/
      events.out.tfevents.*            # TensorBoard logs

Related Pages

Page Connections

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