Skip to content

[Newton] Drop explicit mujoco/mujoco-warp pins, defer to newton[sim]#5566

Open
hujc7 wants to merge 2 commits into
isaac-sim:developfrom
hujc7:jichuanh/drop-mujoco-deps
Open

[Newton] Drop explicit mujoco/mujoco-warp pins, defer to newton[sim]#5566
hujc7 wants to merge 2 commits into
isaac-sim:developfrom
hujc7:jichuanh/drop-mujoco-deps

Conversation

@hujc7
Copy link
Copy Markdown
Collaborator

@hujc7 hujc7 commented May 10, 2026

Summary

  • mujoco and mujoco-warp are already declared under Newton's [sim] optional-dependency extra. Re-listing them in IsaacLab's setup.py was redundant and pinned them at IsaacLab's chosen versions instead of Newton's.
  • The pins also lived in source/isaaclab/setup.py's top-level INSTALL_REQUIRES, so users installing only the PhysX or Kit backends were forced to pull MuJoCo even though nothing in isaaclab core imports it.
  • Switch the Newton spec to newton[sim] @ git+... and remove the direct pins from both setup.py files plus the wheel builder manifest. Newton becomes the single source of truth for those versions.

Verification

  • grep -rn "import mujoco\|import mujoco_warp\|MjModel\|MjData" across the repo: zero direct usages. The Newton backend uses newton.solvers.SolverMuJoCo (transitive). MJCF asset import goes through Isaac Sim's isaacsim.asset.importer.mjcf, not the mujoco Python package.
  • Newton's pyproject.toml [sim] extra: mujoco~=3.8.0, mujoco-warp>=3.8.0.1,~=3.8.0. Newton's compatible-release spec already covers the patch versions IsaacLab was hard-pinning.
  • All other install pathways (./isaaclab.sh -i, cli/commands/install.py, docker/Dockerfile.*, environment.yml, root pyproject.toml, per-package pyproject.toml) read deps from these three files; no other version pins exist.
  • ./isaaclab.sh -f passes.

Test plan

  • Fresh ./isaaclab.sh -i --install newton install resolves Newton, mujoco, and mujoco-warp transitively.
  • Smoke-test a Newton-backed task to confirm the MuJoCo Warp solver still loads.
  • Wheel build with tools/wheel_builder produces wheels with the same set of MuJoCo packages as before.

Newton declares `mujoco` and `mujoco-warp` under its `[sim]` extra, so
listing them again in IsaacLab's setup.py was redundant and forced the
core `isaaclab` package (used by PhysX and Kit backends too) to pull in
MuJoCo even when nothing in IsaacLab core imports it.

Switch the Newton install spec to `newton[sim] @ git+...` and remove the
direct pins. Mirror the same change in the wheel builder manifest so
wheel builds stay in sync with `isaaclab_newton/setup.py`.
@github-actions github-actions Bot added isaac-lab Related to Isaac Lab team infrastructure labels May 10, 2026
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.

🤖 Isaac Lab Review Bot

Summary

Removes redundant mujoco and mujoco-warp version pins from isaaclab core and isaaclab_newton, deferring to Newton's [sim] extra as the single source of truth for these transitive dependencies. Users installing only PhysX/Kit backends no longer pull in MuJoCo unnecessarily.

Design Assessment

Design is sound. This is the correct architectural decision — isaaclab core doesn't import MuJoCo anywhere (grep -rn "import mujoco" = zero hits), so it shouldn't declare it as a dependency. Newton already pins the compatible versions in its [sim] extra, so newton[sim] @ git+... is the right specifier for isaaclab_newton.

Findings

No issues found. The change is minimal, correct, and well-motivated:

  • isaaclab/setup.py: Removes two lines that forced MuJoCo on PhysX/Kit users
  • isaaclab_newton/setup.py: Switches from direct pins to newton[sim] (single source of truth)
  • tools/wheel_builder/res/python_packages.toml: Same cleanup for the wheel builder
  • ✅ Changelogs properly categorized (Removed for isaaclab, Changed for isaaclab_newton)

Test Coverage

No new tests needed — this is a build/dependency configuration change with no runtime code impact. The existing CI Build Wheel check passing confirms the dependency resolution still works.

CI Status

  • Build Wheel: ✅ pass
  • Check changelog fragments: ✅ pass
  • pre-commit: ✅ pass
  • Check for Broken Links: ❌ fail (likely unrelated)

Verdict

Ship it

Clean dependency hygiene fix. Single source of truth for MuJoCo versions, no unnecessary transitive deps for PhysX/Kit users.

@hujc7 hujc7 changed the title Drop explicit mujoco/mujoco-warp pins, defer to Newton [Newton] Drop explicit mujoco/mujoco-warp pins, defer to newton[sim] May 10, 2026
CI on isaaclab_tasks / isaaclab_newton failed because pip resolves
`newton @ git+url` once per URL: the bare spec in isaaclab_visualizers
and isaaclab_physx was processed before the `newton[sim] @ git+url` in
isaaclab_newton, so the `[sim]` extra (which carries mujoco and
mujoco-warp) was dropped and tests hit `ModuleNotFoundError: mujoco`.

Switch every `newton @ git+...` site in source/ to `newton[sim] @ ...`
so any install order pulls the MuJoCo solver deps transitively.
@hujc7 hujc7 marked this pull request as ready for review May 11, 2026 12:35
@hujc7 hujc7 requested a review from hhansen-bdai as a code owner May 11, 2026 12:35
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 11, 2026

Greptile Summary

This PR removes redundant mujoco==3.8.0 and mujoco-warp==3.8.0.1 pins from isaaclab core and isaaclab_newton, and upgrades all Newton references from bare newton @ git+... to newton[sim] @ git+... so that MuJoCo packages are resolved transitively through Newton's own [sim] extra.

  • source/isaaclab/setup.py: Removes mujoco and mujoco-warp from top-level INSTALL_REQUIRES; neither package is directly imported by isaaclab core, eliminating a spurious install-time dep for PhysX/Kit-only users.
  • source/isaaclab_newton/setup.py, source/isaaclab_physx/setup.py, source/isaaclab_visualizers/setup.py: All Newton extras switch to newton[sim] to prevent pip's URL-based deduplication from stripping the [sim] extras when multiple packages in the same environment declare the same VCS URL.
  • tools/wheel_builder/res/python_packages.toml: Explicit mujoco/mujoco-warp entries dropped from the newton group; the generated pyproject.toml will carry only newton[sim] @ git+... and rely on pip for transitive resolution at install time.

Confidence Score: 4/5

Safe to merge; the change is a straightforward dependency-management cleanup with no functional code changes and a clear rationale for every decision.

The core removal of mujoco from isaaclab's top-level deps is clean and correct. The switch to newton[sim] everywhere is logically sound given pip's URL-deduplication behavior. Two minor concerns are worth a second look: the version constraint on mujoco loosens from an exact pin to a compatible-release range, so future patch releases could be picked up; and the rerun/viser extras now carry a full mujoco install that those visualization backends don't actually use.

source/isaaclab_visualizers/setup.py — the rerun and viser extras now transitively install mujoco/mujoco-warp; worth confirming this is intentional for all user-facing install scenarios.

Important Files Changed

Filename Overview
source/isaaclab/setup.py Removes mujoco==3.8.0 and mujoco-warp==3.8.0.1 from top-level INSTALL_REQUIRES; no isaaclab core code imports these packages directly.
source/isaaclab_newton/setup.py Removes explicit mujoco/mujoco-warp pins from the "all" extra and upgrades newton to newton[sim]; mujoco resolution is now deferred to Newton's compatible-release constraint (~=3.8.0) rather than the former exact pin (==3.8.0).
source/isaaclab_physx/setup.py Upgrades the newton extra from bare newton to newton[sim]; PhysX users who enable the newton add-on will now transitively install mujoco and mujoco-warp.
source/isaaclab_visualizers/setup.py All three newton-bearing extras (newton, rerun, viser) now use newton[sim]; rerun- and viser-only installs will now pull in mujoco and mujoco-warp even though those backends don't use the MuJoCo solver.
tools/wheel_builder/res/python_packages.toml Explicit mujoco and mujoco-warp entries removed from the newton optional group; the wheel's generated pyproject.toml will list only newton[sim] @ git+..., relying on pip to resolve mujoco transitively at install time.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["pip install isaaclab_newton[all]"] --> B["newton[sim] @ git+...@v1.2.0rc2"]
    B --> C["Newton package\n(physics engine)"]
    B --> D["[sim] extras\nmujoco~=3.8.0\nmujoco-warp>=3.8.0.1,~=3.8.0"]
    D --> E["mujoco (latest 3.8.x)"]
    D --> F["mujoco-warp (latest 3.8.x)"]
    G["pip install isaaclab_physx[newton]"] --> B
    H["pip install isaaclab_visualizers[newton/rerun/viser]"] --> B
    I["pip install isaaclab (core only)"] --> J["No mujoco/mujoco-warp Installed"]
    style D fill:#f9f,stroke:#333
    style I fill:#9f9,stroke:#333
    style J fill:#9f9,stroke:#333
Loading

Reviews (1): Last reviewed commit: "Use newton[sim] in all Newton declaratio..." | Re-trigger Greptile

"mujoco-warp==3.8.0.1",
"PyOpenGL-accelerate==3.1.10",
"newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2",
"newton[sim] @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Loosened mujoco/mujoco-warp version constraints

The previous explicit pins (mujoco==3.8.0, mujoco-warp==3.8.0.1) guaranteed exact reproducibility. Newton's [sim] extra specifies mujoco~=3.8.0 (compatible-release, i.e. >=3.8.0,<3.9.0) and mujoco-warp>=3.8.0.1,~=3.8.0, so a fresh install after a new 3.8.x release could resolve a different patch version than was tested. Since Newton is pinned to an immutable tag (v1.2.0rc2) the constraint itself won't change, but pip will still pick the latest matching patch from PyPI at install time. Worth confirming the team is comfortable trading bit-for-bit reproducibility for deferred version management.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +25 to 31
"newton[sim] @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2",
"rerun-sdk>=0.29.0",
],
"viser": [
"newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2",
"newton[sim] @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2",
"viser>=1.0.16",
],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 rerun and viser extras now force-install MuJoCo

Before this PR the rerun and viser extras pulled in bare newton (no MuJoCo). After, they request newton[sim], so users who install only isaaclab_visualizers[rerun] or isaaclab_visualizers[viser] will now also download mujoco and mujoco-warp — packages those visualization backends do not use directly. The PR description gives a valid pip-deduplication rationale (a bare newton @ git+URL elsewhere could shadow the [sim] extras), but it is worth documenting in the changelog or a comment why visualization-only extras now carry the full MuJoCo install.

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

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants