Skip to content

Conversation

ooctipus
Copy link
Collaborator

Description

This PR ensures all imports follows the string import style.
String import style avoid pulling of unnecessary packages that is related to other environments, this pr makes sure all environments are using this import.

Type of change

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

Screenshots

Please attach before and after screenshots of the change if applicable.

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

@ooctipus ooctipus requested review from michaellin6 and peterd-NV and removed request for Mayankm96 and kellyguo11 October 22, 2025 23:25
@github-actions github-actions bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Oct 22, 2025
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR standardizes Gymnasium environment registration across the IsaacLab codebase by converting all direct imports to string-based lazy imports. The changes affect environment registration files in direct/ workflows (factory, forge) and manager_based/ manipulation tasks (lift, pick_place, stack). Instead of importing environment classes and configuration objects directly at module load time, the code now uses f-string interpolations with __name__ (e.g., f"{__name__}.factory_env:FactoryEnv") as entry points. This pattern defers actual module loading until gym.make() is called, preventing unnecessary dependency loading and improving import performance. The change follows Gymnasium's standard registration pattern and aligns with the existing architecture where environment configurations are resolved at instantiation time rather than registration time.

PR Description Notes:

  • Checkbox formatting inconsistency: Line with "I have made corresponding changes to the documentation" has [] instead of [ ]

Potential Issues

  1. Critical: Incorrect CHANGELOG date - The changelog entry for version 0.11.2 is dated 2025-10-22, which is in the future. This should be corrected to the actual release date (likely 2024-10-22 based on surrounding entries).

  2. Robomimic configuration path format change - In stack/config/franka/__init__.py and other files, the robomimic_bc_cfg_entry_point changed from filesystem paths using os.path.join(agents.__path__[0], "robomimic/bc.json") to module-style paths f"{agents.__name__}:robomimic/bc.json". This assumes the framework can resolve JSON file paths using the module:resource syntax with colon separators. If the robomimic integration expects actual filesystem paths rather than module references, this could cause runtime failures when trying to load BC policies. This should be verified with tests.

  3. Missing verification for string-based resource loading - The PR changes resource references (especially for JSON configuration files) from filesystem paths to string-based module references. While this works for Python classes via import mechanisms, JSON files require special handling (likely through importlib.resources or similar). The codebase should have mechanisms to resolve these string references to actual file paths at runtime.

Confidence Score

3/5 - The code changes are mechanically correct and follow a clear pattern, but there are concerns about the robomimic configuration path format change and the incorrect changelog date. The lack of tests mentioned in the checklist is also concerning for validating that string-based resource loading works correctly for non-Python files (JSON configs). The pattern is sound for Python class imports, but the JSON file path changes need verification.

7 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@ooctipus ooctipus moved this to In review in Isaac Lab Oct 22, 2025
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

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant