feat(examples): migrate LIBERO Isaac examples + shared harness from robots-sim#1276
Open
yinsong1986 wants to merge 2 commits into
Open
feat(examples): migrate LIBERO Isaac examples + shared harness from robots-sim#1276yinsong1986 wants to merge 2 commits into
yinsong1986 wants to merge 2 commits into
Conversation
…obots-sim (closes strands-labs#1273) Port the Isaac-specific LIBERO examples and their shared harness from strands-labs/robots-sim into examples/libero/, now that the Isaac backend is vendored in-tree (create_simulation("isaac") -> strands_robots.simulation.isaac.IsaacSimulation): - run_isaac.py LIBERO eval on the Isaac backend (grep-stable output lines, synchronous rollout-MP4 recorder) - run_isaac_agent.py same eval driven by a Strands Agent (single @tool wrapper) - libero_backend_matrix.py subprocess-and-parse side-by-side backend matrix table - gr00t_server_deterministic_wrapper.py container-side strict-determinism wrapper for run_gr00t_server Changes vs the robots-sim originals: - Rewrote `from strands_robots_sim.isaac import IsaacSimulation` to `from strands_robots.simulation.isaac import IsaacSimulation` in both run files; updated stale strands_robots_sim/ module-path references and `strands-robots-sim[isaac]` install hints to `strands-robots[sim-isaac,benchmark-libero]`. - Per epic strands-labs#1269 conventions: multi-file example lives in a named subdir with its own README.md (deps via extras, no per-dir requirements.txt); indexed the three host-side scripts in examples/README.md; documented the STRANDS_ISAAC_RTX_PATHTRACING env var. - Applied this repo's ruff rules (UP037 quoted-annotation removal, format). Per the issue, run_mujoco.py/run_mujoco_agent.py are NOT migrated (handled under a separate epic-strands-labs#1269 child); the matrix script prints `unavailable (no <driver>.py)` rows for the not-yet-migrated mujoco and isaac-4096 drivers and evaluates the isaac-1 (single-env) row. strands-labs#140's RTX warm-up fix is upstream, so these migrate as runnable with no skip marker. Verified create_simulation("isaac") resolves the in-tree backend and IsaacSimulation.is_available() short-circuits cleanly on this non-Isaac (no-GPU) host. `hatch run lint` clean; `hatch run test` 8077 passed with only the pre-existing OpenGL/rendering environmental failures.
| main() | ||
| except SystemExit: | ||
| raise | ||
| except BaseException: # noqa: BLE001 - top-level: log + force non-zero exit |
| main() | ||
| except SystemExit: | ||
| raise | ||
| except BaseException: # noqa: BLE001 - top-level: log + force non-zero exit |
3 tasks
Member
Review — LIBERO Isaac examples + shared harnessReviewed against a local checkout. Independent of the other examples; lands last in the roll-up ordering. Verified
CodeQL triage
No blockers. The shared-harness + backend-matrix approach (one LIBERO task across every installed backend with a side-by-side |
6 tasks
cagataycali's CodeQL triage on the LIBERO Isaac examples flagged two items. (1) libero_backend_matrix.py:129 - _RE_BENCHMARK was unused dead code despite a comment claiming it guards print-format drift; wired it into _parse_driver_output so a driver that exits 0 without a benchmark_name= announce line is surfaced as 'ok (... output format drift?)' in the row status instead of masquerading as a silent early exit. (2) run_isaac_agent.py:849 - narrowed the empty 'except Exception: pass' around _sim.destroy() in finally teardown to the concrete (RuntimeError, OSError, AttributeError) and added a logger.debug + comment so a real teardown failure is logged rather than silently swallowed.
Contributor
Author
|
Thanks for the CodeQL triage @cagataycali. Addressed the two actionable items in db4480f:
Left the two top-level
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrates the Isaac-specific LIBERO examples and their shared harness from
strands-labs/robots-sim/examples/libero/into this repo'sexamples/libero/, now that the Isaac backend is vendored in-tree (epic #1144).New files under
examples/libero/:run_isaac.pycreate_simulation("isaac"); two grep-stable output lines + synchronous rollout-MP4 recorderrun_isaac_agent.pyAgent(single@toolwrapper)libero_backend_matrix.pygr00t_server_deterministic_wrapper.pyrun_gr00t_server(importsgr00t.*/torch/tyro; runs inside the GR00T container, not on the host)README.mdWhy
Follow-up to backend-absorb epic #1144 / migration epic #1269. With the
Isaac backend in-tree,
create_simulation("isaac", ...)resolves tostrands_robots.simulation.isaac.IsaacSimulation, so these examples nolonger need the external
strands-robots-simpackage.Key changes vs the robots-sim originals
from strands_robots_sim.isaac import IsaacSimulation->
from strands_robots.simulation.isaac import IsaacSimulationin bothrun files. Updated stale
strands_robots_sim/...module-path referencesin docstrings/comments and the
strands-robots-sim[isaac]install hintsto
strands-robots[sim-isaac,benchmark-libero].with its own
README.md; deps documented via extras (no per-dirrequirements.txt); indexed the three host-side scripts inexamples/README.md; documented the newSTRANDS_ISAAC_RTX_PATHTRACINGenv var.
Test surface
create_simulation("isaac", headless=True, num_envs=1, render_mode="rtx_realtime")constructs the in-tree
IsaacSimulationand destroys cleanly on thisnon-Isaac (no-GPU) host.
IsaacSimulation.is_available()short-circuits with the install-hintreason string (no
omni.*/isaacsim.*import needed) — safe toimport/lint on CPU-only CI.
run_isaac._suite_for_taskdoctests pass.hatch run lint: clean (Success: no issues found in 755 source files).hatch run test: 8077 passed, 45 skipped. The only failures are thepre-existing OpenGL/rendering environmental ones
(
test_sim_camera_mesh_publish,test_lerobot_e2e::test_record_train_load_loop,test_rendering.py/test_policy_runner.py) — confirmed identical on cleanupstream/main(mjr_makeContext/ "an OpenGL platform library has notbeen loaded"). This PR touches only
examples/, so it cannot affectlibrary tests.
Acceptance criteria (from #1273)
libero/run_isaac.py,run_isaac_agent.pyas runnable (no skip marker — feat: dataset format bridge — LeRobot recording to GR00T training format #140 RTX fix is upstream)libero/libero_backend_matrix.py,gr00t_server_deterministic_wrapper.pyrun_mujoco.py/run_mujoco_agent.pystrands_robots_simimports ->strands_robotscreate_simulation("isaac")path works now that the backend is in-treeexamples/libero/, noNN_*.pyrenumberingrequirements.txt; deps documented viapip install "strands-robots[sim-isaac,...]"examples/README.mdOut-of-scope follow-ups
run_mujoco.py/run_mujoco_agent.pymigration +run_isaac_fleet.py(R23)are separate epic-[EPIC] Migrate robots-sim examples into this repo #1269 children. Until they land,
libero_backend_matrix.pyprints
unavailable (no <driver>.py)for themujoco/isaac-4096rows(graceful degradation by design) and evaluates the
isaac-1row.robots-sim's staleexamples/MIGRATION.md(tracked in [EPIC] Migrate robots-sim examples into this repo #1269).Parent: #1269. Board: this issue should move to In review on
Strands Labs - Robots.