Skip to content

Remove RLFramework enum, replace with plain string#544

Merged
cvolkcvolk merged 3 commits intomainfrom
cvolk/remove-rl-framework-enum
Apr 9, 2026
Merged

Remove RLFramework enum, replace with plain string#544
cvolkcvolk merged 3 commits intomainfrom
cvolk/remove-rl-framework-enum

Conversation

@cvolkcvolk
Copy link
Copy Markdown
Collaborator

@cvolkcvolk cvolkcvolk commented Apr 7, 2026

Summary

  • Deletes isaaclab_arena/reinforcement_learning/: A module that existed solely for an RLFramework enum whose only method produced strings like "rsl_rl_cfg_entry_point"
  • Replaces rl_framework: RLFramework with rl_framework_entry_point: str on IsaacLabArenaEnvironment and let the user pass in the correct string directly

The isaaclab_arena.reinforcement_learning module existed solely for
an RLFramework enum whose only method produced strings like
"rsl_rl_cfg_entry_point". This is an IsaacLab gym registration
convention, not a core Arena concept.

Replace rl_framework: RLFramework with rl_framework_entry_point: str
on IsaacLabArenaEnvironment. The constructor now validates that both
rl_framework_entry_point and rl_policy_cfg are set together or not at
all. The reinforcement_learning module is deleted.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 8, 2026

Greptile Summary

This PR removes the isaaclab_arena/reinforcement_learning/ module (which contained only an RLFramework enum) and replaces the rl_framework: RLFramework parameter on IsaacLabArenaEnvironment with a plain rl_framework_entry_point: str. Two example environments (DexsuiteLiftEnvironment, LiftObjectEnvironment) and the corresponding doc snippet are updated to pass the string directly. The refactor is clean — no dangling imports to the deleted module remain anywhere in the codebase.

Confidence Score: 5/5

Safe to merge — clean simplification with no remaining references to the deleted module and proper paired-None validation on the new parameters.

All findings are P2 or lower; no correctness, data-integrity, or reliability issues were found. The deletion is complete (no dangling imports), the new string-based API is well-documented, and the paired validation guard prevents misuse.

No files require special attention.

Vulnerabilities

No security concerns identified.

Important Files Changed

Filename Overview
isaaclab_arena/environments/isaaclab_arena_environment.py Replaces rl_framework: RLFramework with rl_framework_entry_point: str; adds paired-None validation and updated docstring. Clean.
isaaclab_arena/environments/arena_env_builder.py Updated build_registered to use the new rl_framework_entry_point string directly as a kwargs key; removes the old enum import. No issues.
isaaclab_arena_environments/dexsuite_lift_environment.py Updated to pass rl_framework_entry_point="rsl_rl_cfg_entry_point" directly; old RLFramework import removed. Clean.
isaaclab_arena_environments/lift_object_environment.py Updated to pass rl_framework_entry_point="rsl_rl_cfg_entry_point" directly; old RLFramework import removed. Clean.
docs/pages/example_workflows/dexsuite_lift/step_1_environment_setup.rst Documentation code snippet updated to reflect the new rl_framework_entry_point plain-string API.
isaaclab_arena/reinforcement_learning/frameworks.py File deleted — was the sole content of the reinforcement_learning module. No remaining references in the codebase.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User code creates IsaacLabArenaEnvironment"] --> B["rl_framework_entry_point: str\ne.g. 'rsl_rl_cfg_entry_point'"]
    B --> C["ArenaEnvBuilder.build_registered()"]
    C --> D["kwargs = {'env_cfg_entry_point': cfg}"]
    D --> E{"rl_framework_entry_point\nset?"}
    E -- Yes --> F["kwargs[rl_framework_entry_point] = rl_policy_cfg"]
    E -- No --> G["Skip RL kwargs"]
    F --> H["gym.register(id=name, kwargs=kwargs)"]
    G --> H
Loading

Reviews (1): Last reviewed commit: "Merge branch 'main' into cvolk/remove-rl..." | Re-trigger Greptile

Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean simplification — the RLFramework enum was unnecessary indirection over what are just well-known string constants.

What's good:

  • Replacing the enum with a plain str removes a module, an import, and a layer of abstraction while keeping the same functionality.
  • The new ValueError guard in IsaacLabArenaEnvironment.__init__ that enforces rl_framework_entry_point and rl_policy_cfg are set/unset together is strictly better than the old assert in build_registered — it fails earlier, gives a clear message, and isn't stripped by -O.
  • Docstring additions clearly explain what values rl_framework_entry_point expects, which the enum never surfaced to the user.
  • All call-sites and docs are updated consistently. No stale references to RLFramework remain in the repo.

One minor note (non-blocking):

  • The reinforcement_learning/ directory only contained frameworks.py (no __init__.py). With that file deleted, the empty directory is gone from git, which is fine — just noting it was never a proper Python package to begin with.

LGTM 👍

@cvolkcvolk cvolkcvolk merged commit d652ed4 into main Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants