Repository navigation
[Mac OS] Support macOS arm64 (CPU-only) in the uv environment - #8191
AntoineRichard wants to merge 2 commits into
Conversation
|
| "botocore", # omni.replicator.core S3 backend | ||
| "starlette>=1.3.1", # livestream; minimum patched for current security advisories | ||
| "omniverseclient==2.74.0", | ||
| # no macOS wheels; isaaclab.utils.assets reads HTTP(S) assets directly without it |
There was a problem hiding this comment.
Remote Cartpole assets cannot load
On macOS, the documented Cartpole task needs a remote USD file. This change excludes omniverseclient, but the current asset downloader still imports omni.client to fetch remote files. The load raises ModuleNotFoundError, so training cannot start unless the separate HTTP asset-fallback change is present.
| uv run isaaclab train --rl_library rsl_rl \ | ||
| --task Isaac-Cartpole-Direct --device cpu physics=newton_mjwarp |
There was a problem hiding this comment.
In this macOS example, --device cpu sets the simulation device, but the RSL-RL agent keeps its cuda:0 default. Non-distributed training does not copy the simulation device to the agent, so building the policy fails on a CPU-only Mac unless the separate runner-fallback change is present.
| assert all( | ||
| package["source"]["registry"] == "https://pypi.org/simple" for package in packages if package not in cuda | ||
| ) |
| assert not any(_applies(dep.get("marker"), env) for dep in usd_core_edges for env in _CUDA_ENVIRONMENTS) | ||
| assert "usd-exchange" in {package["name"] for package in lock["package"]} |
There was a problem hiding this comment.
Second macOS USD provider goes undetected
This test rules out usd-core on CUDA platforms, but it does not rule out usd-exchange on macOS. If a transitive dependency adds usd-exchange there, both packages could install the same pxr files while this test passes. Check the lockfile dependencies for both providers on each supported platform.
There was a problem hiding this comment.
Isaac Lab Review Bot
Adds experimental CPU-only macOS arm64 support through platform markers, PyPI torch sources, and a darwin-only usd-core provider. The overall platform split is coherent, but the documentation incorrectly describes the entire importers extra as unavailable and the macOS torch lock assertion can pass without any macOS torch entry.
- Design and architecture: The platform-specific dependency split stays at the existing resolver boundary: markers select one pxr provider and the appropriate torch index without introducing a parallel installation mechanism or new abstraction.
- API: The reviewed surface includes root dependencies and extras,
[tool.uv].environments, platform-specific torch sources, theisaaclab_ovdependency metadata, and generated override files. Existing extra names and package pins remain, but the public documentation misstates theimportersbehavior: onlyisaacsim-asset-isolatedis excluded on macOS, whiletinyobjloaderremains available through the extra. - Compatibility and deprecation: Breaking changes: none identified. The added darwin environment and darwin-only dependencies extend source-checkout support, while the new exclusion markers preserve the prior Linux and Windows dependency selections. The generated override copies consistently retain the non-macOS
usd-exchangerequirement. - Implementation: The dependency markers are propagated consistently from the root metadata into both generated override files and the
isaaclab_ovovstagedependency. The macOS path selects PyPI for the torch stack andusd-coreinstead ofusd-exchange, while CUDA platforms retain their existing sources and provider. - Style consistency: The marker spelling and changelog coverage are consistent with adjacent metadata patterns. However, the installation guide and Isaac Lab changelog say the whole
importersextra is unavailable or skipped on macOS, contradicting the metadata that retainstinyobjloader; both statements should identify only the unavailable Isaac Sim asset importer. - Test quality: The changed packaging tests extend existing owner-boundary checks rather than adding duplicate platform tests. The CUDA torch assertions remain explicit, but the new macOS/PyPI assertion is vacuous when no non-CUDA package exists; assert that the macOS selection is non-empty before validating its registry.
Minor fixes needed. Posted 2 actionable findings inline.
Automated review; human maintainers own approval decisions.
| assert cuda | ||
| assert all(package["version"].endswith("+cu130") for package in cuda) | ||
| assert all(package["source"]["registry"] == "https://download.pytorch.org/whl/cu130" for package in cuda) | ||
| assert all( |
There was a problem hiding this comment.
🟡 Warning · Test Quality — macOS torch assertion passes vacuously
The CUDA half is guarded by assert cuda, but this all(...) iterates packages if package not in cuda, which is True for an empty sequence. If the darwin environment is dropped or the lock stops forking these entries, the documented "macOS resolves PyPI torch" contract goes unverified while the test still passes. Assert that the non-CUDA selection is non-empty before checking its registry, mirroring assert cuda.
| :sync: macos-arm64 | ||
|
|
||
| macOS support is experimental and CPU-only. It covers the Newton backend without Isaac Sim; | ||
| Isaac Sim, the OV PhysX and OV RTX backends, and the ``importers`` extra are unavailable. |
There was a problem hiding this comment.
🔵 Suggestion · Style Consistency — Docs overstate importers extra removal
pyproject.toml excludes only isaacsim-asset-isolated on darwin; tinyobjloader still resolves, so uv run --extra importers installs on macOS. Saying the whole extra is unavailable contradicts the metadata, and the changelog fragment repeats the claim. Reword both to state that the standalone Isaac Sim asset importer is unavailable.
Description
Adds experimental, CPU-only macOS on Apple silicon to the source checkout's uv environment, so
uv run isaaclab …resolves and installs on a Mac and runs kit-less Newton workflows (Newton + MuJoCo-Warp on Warp's CPU device, PyTorch on CPU).Today
uv syncon a Mac stops immediately:The current Python platform is not compatible with the lockfile's supported environments.Changes:
[tool.uv].environments: addedsys_platform == 'darwin' and platform_machine == 'arm64'.cu130index has no macOS wheels, so the source switches to PyPI on macOS (same pinned versions).omniverseclient: covered by the HTTP asset fallback in [Mac OS] Read HTTP(S) assets without omni.client when it is unavailable #8189isaacsimextraov,ovphysxandovrtxextras, plusovstageinisaaclab_ovisaacsim-asset-isolatedin theimportersextra: it needsusd-optimizepxrprovider:usd-exchangehas no macOS wheels, so macOS installsusd-coreinstead. Each platform still gets exactly onepxrprovider.usd-exchangeoverride repeats the marker, because uv overrides replace markers too.uv-overrides.txtfiles are regenerated, anduv.lockis re-locked.test_version_single_source_matches_literal_pins,test_resolved_torch_stack_supports_blackwellandtest_resolved_environment_has_no_second_usd_providernow check their invariants per platform instead of assuming every platform is CUDA:+cu130torch andusd-exchange, and no lock edge may pullusd-corethere.usd-coreonly.Linux and Windows resolutions are unchanged. The lock diff for those platforms only updates the workspace members' own versions (
isaaclab31.0.0 → 32.1.0, …):uv lock --checkalready fails ondevelopbecause the lock predates the last version bumps.Works best with (independent, can merge in any order):
omni.client(asset loading fails on macOS without it)--devicedefaults tocpuon macOS (the docs pass--device cpuexplicitly, so this one is optional)Type of change
Validation
On macOS 26 / Apple M-series, with this branch plus the three PRs above:
This trains to completion (mean reward 0.09 → 1.75 over 30 iterations, 64 envs). All
isaaclab,isaaclab_newton,isaaclab_tasks,isaaclab_rl,isaaclab_assets,isaaclab_physx,isaaclab_ov, andisaaclab_visualizersmodules import.source/isaaclab/test/cli/test_source_package_metadata.py,test_uv_run_pyproject.py, andtest_wheel_builder_metadata.pyall pass (26 tests).Not validated on macOS yet: the Newton GL / Rerun / Viser visualizers, and other tasks and RL libraries.
Checklist
pre-commitchecks withuv run isaaclab --format(all hooks pass exceptcheck-git-lfs-pointers, which needs git-lfs installed locally)source/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bump package versions — CI handles that)CONTRIBUTORS.mdor my name already exists there