Conversation
| # Override resources | ||
| python osmo/launch_arena.py --gpus 2 --platform ovx-l40 --memory 128Gi --pool isaac-dev-l40-03 | ||
|
|
||
| # Dry run (print rendered YAML without submitting) |
There was a problem hiding this comment.
🟡 Warning: Broken shell continuation in docstring example
This line is missing a trailing backslash \\ to continue to --command on the next line. Without it, the shell interprets this as the complete command and tries to run --command ... as a separate command.
| # Dry run (print rendered YAML without submitting) | |
| --pool isaac-dev-l40-03 \\ |
Greptile SummaryThis PR adds an OSMO workflow integration for Isaac Lab Arena: a Jinja-style YAML template ( Confidence Score: 5/5Safe to merge; all findings are P2 style/robustness suggestions that don't block the primary workflow submission path. No P0 or P1 defects in the current state of the code. The primary use case (default or custom command submission) works correctly. Issues found are a broken docstring example, absence of a guard for an unresolved template token in edge cases, a temp-file leak on subprocess exception, and a non-pinned image tag — all P2. osmo/launch_arena.py — missing backslash in docstring and no guard when command extraction fails. Important Files Changed
Sequence DiagramsequenceDiagram
actor Dev as Developer
participant CLI as launch_arena.py
participant YAML as arena_base.yaml
participant Tmp as /tmp/arena_*.yaml
participant OSMO as osmo CLI
participant Platform as OSMO Platform
participant Container as Isaac Sim Container
Dev->>CLI: python osmo/launch_arena.py --pool ... [--command ...]
CLI->>YAML: read_text() (extract default command via regex if --command not given)
CLI->>CLI: render_yaml(): strip default-values, substitute tokens
CLI->>Tmp: write rendered YAML
CLI->>OSMO: osmo workflow submit /tmp/arena_*.yaml [--pool] [--priority]
OSMO->>Platform: submit workflow
Platform->>Container: pull nvcr.io/.../isaaclab_arena:latest and start
Container->>Container: bash /tmp/entry.sh (ldconfig, symlink, LFS copy)
Container->>Container: execute command (e.g. policy_runner.py or pytest)
Container-->>Platform: exit code
Platform-->>OSMO: workflow result
OSMO-->>CLI: returncode
CLI->>Tmp: unlink temp file
CLI-->>Dev: exit with returncode
Reviews (1): Last reviewed commit: "pre-commit" | Re-trigger Greptile |
| --pool isaac-dev-l40-03 | ||
| --command 'ISAACLAB_ARENA_SUBPROCESS_TIMEOUT=900 \ |
There was a problem hiding this comment.
Missing backslash breaks "Run tests" example
Line 23 is missing a trailing \, so the shell ends the command at --pool isaac-dev-l40-03 and treats the next line as a new (and unknown) top-level command. Anyone copy-pasting this will see an error rather than a working invocation.
| --pool isaac-dev-l40-03 | |
| --command 'ISAACLAB_ARENA_SUBPROCESS_TIMEOUT=900 \ | |
| --pool isaac-dev-l40-03 \ | |
| --command 'ISAACLAB_ARENA_SUBPROCESS_TIMEOUT=900 \ |
| if command: | ||
| values["command"] = command |
There was a problem hiding this comment.
Silent
{{ command }} placeholder if extraction fails
If command is falsy (empty string passed via --command '', or the regex on line 128 doesn't match), values["command"] is never set and the {{ command }} token at line 52 of arena_base.yaml remains verbatim in the rendered YAML. OSMO will then execute a bash script with {{ command }} as a literal line, producing a confusing error with no indication of the root cause.
Adding a guard here to catch the failure early would improve reliability:
if not command:
print("Error: could not determine command to run. Pass --command explicitly.", file=sys.stderr)
return 1
values["command"] = command| with tempfile.NamedTemporaryFile(mode="w", suffix=".yaml", prefix="arena_", delete=False) as f: | ||
| f.write(rendered) | ||
| rendered_path = f.name | ||
|
|
||
| cmd = ["osmo", "workflow", "submit", rendered_path] | ||
| if args.pool: | ||
| cmd.extend(["--pool", args.pool]) | ||
| if args.priority: | ||
| cmd.extend(["--priority", args.priority]) | ||
|
|
||
| print(f"Submitting workflow '{args.workflow_name}':") | ||
| print(f" {' '.join(cmd)}") | ||
| print(f" (rendered from {args.yaml})\n") | ||
|
|
||
| result = subprocess.run(cmd) | ||
|
|
||
| Path(rendered_path).unlink(missing_ok=True) |
There was a problem hiding this comment.
Temp file leaked if
subprocess.run raises
subprocess.run raises FileNotFoundError when osmo is not on PATH and PermissionError in other OS-level failures. If either exception escapes, the unlink on line 158 is never reached and the rendered YAML (which includes the full shell command) is left in /tmp. A try/finally block is the idiomatic fix:
try:
result = subprocess.run(cmd)
finally:
Path(rendered_path).unlink(missing_ok=True)
return result.returncode|
|
||
|
|
||
| path: /tmp/entry.sh | ||
| image: nvcr.io/nvstaging/isaac-amr/isaaclab_arena:latest |
There was a problem hiding this comment.
:latest tag makes workflow non-reproducible
Pinning to :latest means two identical invocations on different days can run against different image contents if the tag is re-pushed. Consider pinning to a specific digest or semantic version tag so workflow results are reproducible and regressions are attributable to code changes rather than image drift.
|
|
||
|
|
||
| path: /tmp/entry.sh | ||
| image: nvcr.io/nvstaging/isaac-amr/isaaclab_arena:latest |
There was a problem hiding this comment.
Suggestion to make this a variable
|
|
||
| # Dry run (print rendered YAML without submitting) | ||
| python osmo/launch_arena.py --pool isaac-dev-l40-03 --dry-run | ||
| """ |
There was a problem hiding this comment.
Shall we move this into a osmo/README.md?
| isaaclab_arena/tests/' | ||
|
|
||
| # Override resources | ||
| python osmo/launch_arena.py --gpus 2 --platform ovx-l40 --memory 128Gi \ |
There was a problem hiding this comment.
Where will the output get dumped to? Suggestion to add to the documentation
| python osmo/launch_arena.py --pool isaac-dev-l40-03 | ||
|
|
||
| # Custom command | ||
| python osmo/launch_arena.py \ |
There was a problem hiding this comment.
Mhh this command stalls for me/ does not return:
✔ ~/workspaces/IsaacLab-Arena [xyao/dev/osmo_base_docker|✚ 1…1⚑ 2]
10:44 $ python osmo/launch_arena.py \
--pool isaac-dev-l40-03 \
--command '/isaac-sim/python.sh isaaclab_arena/evaluation/policy_runner.py \
--policy_type zero_action --num_steps 500 --headless \
kitchen_pick_and_place --object cracker_box --embodiment franka_ik'
Submitting workflow 'arena-evaluation':
osmo workflow submit /tmp/arena_zio674a_.yaml --pool isaac-dev-l40-03 --priority NORMAL
(rendered from /home/cvolk/workspaces/IsaacLab-Arena/osmo/arena_base.yaml)
| Usage examples: | ||
|
|
||
| # Default evaluation (zero_action on kitchen_pick_and_place) | ||
| python osmo/launch_arena.py --pool isaac-dev-l40-03 |
There was a problem hiding this comment.
Suggestion to add a note about setting up OSMO (-credentials)
Summary
Arena non-gr00t scripts can run on OSMO.
Detailed description
python osmo/launch_arena.py ...outside the docker env.