Skip to content

Cherry-pick for fix Rlinf config path#6138

Open
mingxueg-nv wants to merge 1 commit into
isaac-sim:release/3.0.0-beta2from
mingxueg-nv:mingxue/fix_path_on_changed_isaaclab_task-release-3.0.0-beta2
Open

Cherry-pick for fix Rlinf config path#6138
mingxueg-nv wants to merge 1 commit into
isaac-sim:release/3.0.0-beta2from
mingxueg-nv:mingxue/fix_path_on_changed_isaaclab_task-release-3.0.0-beta2

Conversation

@mingxueg-nv

@mingxueg-nv mingxueg-nv commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes path of RLinf config yaml file caused by missing path resolver.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@mingxueg-nv mingxueg-nv requested a review from ooctipus as a code owner June 11, 2026 06:06
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Jun 11, 2026
@mingxueg-nv mingxueg-nv changed the title fix config path Cherry-pick for fix Rlinf config path Jun 11, 2026
@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug where the RLinf config YAML file could not be located when installed as part of the isaaclab_tasks package, because both play_rlinf.py and train_rlinf.py were unconditionally falling back to the script's own directory instead of searching the package tree.

  • play_rlinf.py: Replaces args_cli.config_path or str(SCRIPT_DIR) with a call to cli_args.resolve_config_dir(config_name, args_cli.config_path), which searches the isaaclab_tasks package tree before falling back to the script directory.
  • train_rlinf.py: Same substitution using the module-level CLI_ARGS handle, aligning its resolution logic with the shared helper.

Confidence Score: 5/5

Safe to merge — both changed files now delegate to a shared, well-structured resolver with a correct fallback chain.

The two-line change in each file is minimal and targeted: it replaces a hardcoded directory fallback with a call to the already-reviewed resolve_config_dir helper that handles explicit paths, package-tree search, and script-directory fallback in that order. The assignment order fix in play_rlinf.py (moving config_name before config_dir) is also correct and required. No new dependencies or side effects are introduced.

No files require special attention.

Important Files Changed

Filename Overview
scripts/reinforcement_learning/rlinf/play_rlinf.py Replaces inline fallback path logic with resolve_config_dir; also swaps the assignment order of config_name and config_dir (now correct, since config_name is needed as an argument).
scripts/reinforcement_learning/rlinf/train_rlinf.py Replaces inline fallback to RLINF_DIR with CLI_ARGS.resolve_config_dir, unifying resolution logic with play_rlinf.py.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User runs play_rlinf.py / train_rlinf.py] --> B{--config_path provided?}
    B -- Yes --> C[Use explicit config_path]
    B -- No --> D{isaaclab_tasks installed?}
    D -- Yes --> E[rglob for config_name.yaml in package tree]
    E --> F{Match found?}
    F -- Yes --> G[Use matched directory]
    F -- No --> H[Fall back to script directory]
    D -- No --> H
    C --> I[Set RLINF_CONFIG_FILE env var]
    G --> I
    H --> I
    I --> J[Hydra loads config YAML]
Loading

Reviews (1): Last reviewed commit: "fix config path" | Re-trigger Greptile

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Clean, focused bug fix that correctly resolves the config path issue for RLinf scripts.

What Changed

Both play_rlinf.py and train_rlinf.py previously used a naive fallback for config directory resolution:

config_dir = args_cli.config_path or str(SCRIPT_DIR)

This failed when YAML configs live inside the isaaclab_tasks package tree rather than the script directory. The fix delegates to cli_args.resolve_config_dir() which implements a proper 3-step resolution:

  1. Explicit --config_path (user override)
  2. Search isaaclab_tasks package tree via rglob
  3. Fall back to script directory

Assessment

Correctness — The fix properly addresses the root cause. Reordering config_name before config_dir is necessary since resolve_config_dir requires the config name for package-tree search.

Consistency — Both scripts now use the same centralized resolution logic, reducing divergence risk.

⚠️ Minor observationresolve_config_dir uses rglob and picks matches[0] if multiple YAMLs match. For uniquely-named configs this is fine, but if a config name could appear in multiple subdirectories, the first match (filesystem order) would win silently. This is pre-existing behavior in cli_args.py and not introduced by this PR, but worth noting for future hardening.

Verdict

LGTM — minimal, well-scoped fix that centralizes config resolution correctly.

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

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants