Skip to content

[Bug Report] play.py hangs in OnPolicyRunner init with rsl-rl 4.0.0+ due to missing obs_groups #5363

Closed

Description

@100milliongold

Describe the bug

With rsl-rl >= 4.0.0, calling OnPolicyRunner(env, agent_cfg.to_dict(), ...) in scripts/reinforcement_learning/rsl_rl/play.py hangs indefinitely if the resolved config dict does not contain an obs_groups key. rsl-rl emits deprecation warnings and then blocks during runner initialization.

Inserting cfg_dict["obs_groups"] = {"actor": ["policy"], "critic": ["policy"]} before passing to OnPolicyRunner allows initialization to complete normally.

Steps to reproduce

cd IsaacLab
./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/play.py \
  --task Isaac-Ant-v0 --num_envs 4 --livestream 2

Stuck log (last meaningful output)

[INFO] Loading experiment from directory: /workspace/isaaclab/logs/rsl_rl/ant
/workspace/isaaclab/_isaac_sim/kit/python/lib/python3.12/site-packages/rsl_rl/utils/utils.py:220:
UserWarning: The observation configuration dictionary 'obs_groups' is empty and thus likely not configured.
Consider configuring the 'obs_groups' dictionary explicitly
  warnings.warn(
/workspace/isaaclab/_isaac_sim/kit/python/lib/python3.12/site-packages/rsl_rl/utils/utils.py:251:
UserWarning: The observation configuration dictionary 'obs_groups' does not contain the 'actor' key...
  warnings.warn(
(hangs indefinitely — observed 16+ minutes)

CPU ~700–800%, GPU utilization ~30% (no real work), Python main thread blocked.

Working patch

IsaacLab/scripts/reinforcement_learning/rsl_rl/play.py around line 142 (inside if agent_cfg.class_name == "OnPolicyRunner":):

# BEFORE
runner = OnPolicyRunner(env, agent_cfg.to_dict(), log_dir=None, device=agent_cfg.device)

# AFTER
cfg_dict = agent_cfg.to_dict()
cfg_dict["obs_groups"] = {"actor": ["policy"], "critic": ["policy"]}
runner = OnPolicyRunner(env, cfg_dict, log_dir=None, device=agent_cfg.device)

After this patch, the runner initializes in <1s and prints Actor Model: MLPModel(...) / Critic Model: MLPModel(...) as expected.

Expected behavior

Either obs_groups should be populated automatically from agent_cfg by Isaac Lab, or OnPolicyRunner should fail fast with a clear error instead of silently hanging.

System Info

  • Isaac Lab: 2.1.1
  • Isaac Sim: 6.0.0-rc.22
  • rsl-rl: bundled in /workspace/isaaclab/_isaac_sim/kit/python/lib/python3.12/site-packages/rsl_rl/ (emits rsl-rl >= 4.0.0 deprecation warnings, likely 4.0.x)
  • Task: Isaac-Ant-v0
  • Python 3.12

Additional context

The deprecation warnings indicate Isaac Lab's RslRlBaseRunnerCfg.to_dict() output no longer matches what rsl-rl 4.0.0+ expects. The warnings state the legacy policy configuration is being used to infer actor and critic models, but the downstream obs_groups resolution silently deadlocks instead of falling back.

This blocks all uses of play.py with freshly trained checkpoints.

Activity

  1. 100milliongold commented on Apr 23, 2026

    @100milliongold
    Author

    Update 2026-04-24 — retested on Isaac Lab 3.0.0-beta1

    The obs_groups hang reproduces identically on Isaac Lab 3.0.0-beta1 (previously observed on 2.1.1). Same warning signature, same indefinite block inside OnPolicyRunner.__init__.

    The patch in the original issue body still resolves it:

    cfg_dict = agent_cfg.to_dict()
    cfg_dict["obs_groups"] = {"actor": ["policy"], "critic": ["policy"]}
    runner = OnPolicyRunner(env, cfg_dict, log_dir=None, device=agent_cfg.device)

    After the patch, OnPolicyRunner initializes in <1s and play.py proceeds to the rollout loop normally.

    Because this is the first failure every user hits after training a fresh checkpoint with rsl-rl >= 4.0.0, a small fast-fail or a default-obs_groups populated from agent_cfg would be a high-impact, low-risk change.

  2. added a commit that references this issue on Apr 24, 2026
    d0eef31
  3. RandomOakForest commented on Apr 24, 2026

    @RandomOakForest
    Collaborator

    Thanks again. The team will take a look.

  4. added
    bug
    on Apr 24, 2026
  5. 100milliongold commented on Apr 25, 2026

    @100milliongold
    Author

    Alternative workaround for users hit by this together with #5364

    When this hang is encountered alongside the livestream black-screen issue (#5364), a single workaround that sidesteps both is to skip OnPolicyRunner entirely and load the actor MLP from the checkpoint directly:

    • rsl-rl 4.x: state["actor_state_dict"] with bare mlp.* keys
    • rsl-rl <4.0: state["model_state_dict"] with actor.mlp.* / policy.mlp.* prefix

    Reconstruct the MLP from RslRlPpoActorCriticCfg.actor_hidden_dims + activation, run inference in a SimulationContext loop (the quadrupeds.py pattern). Our K8s wrapper at play_livestream.py does this; CLI mirrors play.py (--task X --num_envs N --livestream 2), so the broken OnPolicyRunner path never executes.

    Sharing in case other users blocked on --livestream 2 want a path that sidesteps both #5363 and #5364 until the upstream fast-fail / default-obs_groups lands.

  6. 100milliongold commented on Apr 25, 2026

    @100milliongold
    Author

    Reproduction (Isaac Lab 3.0.0-beta1, Isaac Sim 6.0.0-rc.22)

    Standard tutorial flow that hangs:

    ./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/play.py \
        --task Isaac-Ant-Direct-v0 \
        --num_envs 64 \
        --checkpoint /workspace/isaaclab/logs/rsl_rl/ant_direct/<run>/model_999.pt \
        --livestream 2 \
        --kit_args "..."
    # OnPolicyRunner.__init__ blocks indefinitely after the obs_groups deprecation warning.

    Path that doesn't trigger #5363 because it never instantiates OnPolicyRunner:

    ./isaaclab.sh -p /workspace/data/replay/play_livestream.py \
        --task Isaac-Ant-Direct-v0 \
        --num_envs 64 \
        --checkpoint /workspace/isaaclab/logs/rsl_rl/ant_direct/<run>/model_999.pt \
        --livestream 2 \
        --kit_args "..."
    # Loads actor MLP weights from the rsl-rl checkpoint dict directly; runs the policy
    # in a SimulationContext loop. No OnPolicyRunner involved. (Also avoids #5364.)
  7. added a commit that references this issue on Aug 16, 2026
    9b74a7f
  8. StafaH commented on Sep 19, 2026

    @StafaH
    Collaborator

    Hi @100milliongold, in isaaclab 3.1 we will remove the compatibility shims for rsl-rl and support only up to date configs. Closing this issue as it will be resolved by #7784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions