Pin packaging>=20.0 to fix Theia CI import failure#5369
Pin packaging>=20.0 to fix Theia CI import failure#5369AntoineRichard wants to merge 4 commits intoisaac-sim:developfrom
Conversation
Theia observation tests on CI fail when transformers is imported:
ValueError: Unable to compare versions for packaging>=20.0:
need=20.0 found=None. This is unusual. Consider reinstalling
packaging.
transformers calls importlib.metadata.version("packaging") at import
time. On Isaac Sim's bundled Python, packaging is on sys.path but the
dist-info metadata is missing, so the lookup returns None. Because
setup.py listed packaging without a version floor, pip considered the
broken copy satisfied and skipped reinstall.
Add >=20.0 (matching transformers' own require_version call) so pip
re-resolves packaging and reinstalls it with valid metadata.
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
Summary
This PR pins packaging>=20.0 in setup.py to fix a CI failure where transformers import fails due to Isaac Sim's bundled packaging library lacking proper dist-info metadata. The fix is minimal, targeted, and correctly documented. The version floor matches the constraint that transformers itself checks at runtime.
Architecture Impact
Self-contained. This change only affects dependency resolution at install time. No runtime code paths are modified. The packaging library is a pure Python utility for version parsing — adding a version floor has no impact on Isaac Lab's tensor pipelines, physics stepping, or RL training loops.
Implementation Verdict
Ship it
Test Coverage
This is a dependency/CI fix, not a logic change. The "test" is whether CI passes after the change — specifically the Theia observation tests that import transformers. No unit test is needed or appropriate for a setup.py dependency pin. The PR description indicates this fixes an existing CI failure, which will serve as implicit validation.
CI Status
No CI checks available yet. The PR should be validated by confirming the Theia-based observation tests pass after merge.
Findings
🔵 Improvement: source/isaaclab/setup.py:54-55 — Comment accuracy
The inline comment is excellent and explains the why clearly. However, the comment says "forces pip to reinstall" which is slightly imprecise — pip will reinstall only if the existing installation doesn't satisfy the constraint. This is minor and the current wording is acceptable for practical purposes.
🔵 Improvement: source/isaaclab/docs/CHANGELOG.rst:3 — Changelog entry is thorough
The changelog entry at lines 3-14 correctly documents the root cause (missing dist-info metadata in Isaac Sim's bundled packaging), the symptom (ValueError on transformers import), and the fix. This is well-written documentation.
🔵 Note: source/isaaclab/config/extension.toml:4 — Version bump is correct
Version incremented from 4.6.11 to 4.6.12 following semver for a patch-level fix. The extension.toml and CHANGELOG.rst are in sync.
No critical or warning-level issues identified. The change is correct, minimal, and well-documented.
Greptile SummaryPins Confidence Score: 5/5Safe to merge — minimal, targeted dependency floor that resolves a well-diagnosed CI failure with no functional risk. All three changed files are trivially correct: the version specifier floor matches transformers' own runtime check, the version bump and changelog are consistent, and no logic changes are introduced. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant pip
participant setup.py
participant IsaacSimPython as Isaac Sim Python
participant transformers
pip->>setup.py: resolve install_requires
setup.py-->>pip: packaging>=20.0
pip->>IsaacSimPython: check installed packaging version
IsaacSimPython-->>pip: metadata-less copy (dist-info missing)
pip->>pip: version constraint not satisfied → reinstall
pip-->>IsaacSimPython: packaging with valid dist-info
IsaacSimPython->>transformers: import AutoModel
transformers->>IsaacSimPython: importlib.metadata.version("packaging")
IsaacSimPython-->>transformers: "24.x" (valid)
transformers-->>IsaacSimPython: import succeeds
Reviews (1): Last reviewed commit: "Pin packaging>=20.0 to fix Theia CI impo..." | Re-trigger Greptile |
The previous fix (pinning packaging>=20.0 in isaaclab's setup.py) was
based on a wrong hypothesis. pip treats 26.0 in Isaac Sim's
core_archive/pip_prebundle as satisfying >=20.0 and does not reinstall.
The downgrade to packaging 23.2 in site-packages is actually driven by
isaaclab_rl's "packaging<24" constraint.
On some Isaac Sim develop images, that uninstall/reinstall leaves a
dist-info whose METADATA is missing the "Version:" header. At runtime,
importlib.metadata.version("packaging") then returns None, which breaks
transformers' require_version("packaging>=20.0") at import time and
fails the Theia observation tests.
Add an explicit --force-reinstall of packaging at the end of
command_install so pip rewrites site-packages/packaging-*.dist-info
cleanly after all other installs have settled. Also revert the
setup.py pin, which was a no-op given ovphysx and transformers already
declare packaging>=20.0 transitively.
…ging-transformers-ci # Conflicts: # source/isaaclab/docs/CHANGELOG.rst
PR isaac-sim#5385 marked Isaac-Cartpole-RGB-TheiaTiny-v0 as xfail with the reason "TheiaTiny environment is currently broken; xfailed pending fix." The underlying breakage is the packaging METADATA corruption addressed in this branch: when importlib.metadata.version("packaging") returns None, transformers' require_version at import time crashes every TheiaTiny code path. With the force-reinstall of packaging in command_install, the metadata is rewritten cleanly and transformers imports succeed, so the xfail mute is no longer needed. Remove it so CI on this PR actually exercises the TheiaTiny task and proves the fix works end-to-end instead of silently passing. Changelog/extension-version bump deferred; will be added in a follow-up commit.
Description
Theia observation tests on CI fail when transformers is imported:
transformers calls importlib.metadata.version("packaging") at import time. On Isaac Sim's bundled Python, packaging is on sys.path but the dist-info metadata is missing, so the lookup returns None. Because setup.py listed packaging without a version floor, pip considered the broken copy satisfied and skipped reinstall.
Add >=20.0 (matching transformers' own require_version call) so pip re-resolves packaging and reinstalls it with valid metadata.
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there