Repository navigation
Cherry-pick: Turn on each Run's cameras for camera video recording in the Experiment Runner (#1829) - #1843
Cherry-pick: Turn on each Run's cameras for camera video recording in the Experiment Runner (#1829)#1843xyao-nv wants to merge 3 commits into
Conversation
CameraObsVideoRecorder failed with an AttributeError when the env had no camera_obs observation group. It now asserts that the group exists, with a message that names environment.enable_cameras, --enable_cameras, and an embodiment with cameras. Recorder and test files of #1829. (cherry picked from commit 95d95a0) (cherry picked from commit fb764f9) Signed-off-by: Xinjie Yao <[email protected]>
Release-only adaptation of #1829. release/0.4.0 reads a YAML Experiment before startup with find_environment_field_values and composes it after startup, so the runner change of #1829 does not apply. With --record_camera_video, the Experiment Runner adds runs.<name>.environment.enable_cameras=true for each Run of a YAML Experiment that leaves it unset. A Run that sets it to anything other than true fails before Isaac Sim starts. Legacy JSON Experiments take no overrides and keep their jobs' values; the recorder names the setting when a job has no cameras. Two fixes make the overrides work: - find_environment_field_values applies shared overrides, as composition does, so it sees shared.environment.enable_cameras. - A graph-spec Run passes --enable_cameras to the graph-environment CLI when its enable_cameras field is true. An override sets the field but not per_run_overrides, which that CLI reads. Signed-off-by: Xinjie Yao <[email protected]>
Confidence Score: 4/5
[Medium impact] The change reaches YAML Experiment runs that record camera video, including OSMO submissions. Fix the rejection of enabled camera expressions before merging. FindingsSummaryThe PR enables cameras for YAML Runs when camera video is requested and improves the recorder's missing-camera error.
Reviews (1) · Last reviewed commit: "Turn on each Run's cameras for camera vi..." · Reviewed by Greptile |
| arena_env_args = legacy_environment_args_to_cli_args({"environment": cfg.env_spec_path, **cfg.per_run_overrides}) | ||
| environment_args = {"environment": cfg.env_spec_path, **cfg.per_run_overrides} | ||
| # A Hydra override such as runs.<name>.environment.enable_cameras=true sets the field, not per_run_overrides. | ||
| if cfg.enable_cameras: |
There was a problem hiding this comment.
🔵 Let cfg.enable_cameras decide in both directions
cfg.enable_cameras starts from per_run_overrides and then takes any Hydra override, so it already holds the value the Run should use. With the if, an override of runs.<name>.environment.enable_cameras=false on a graph Run whose YAML sets true still passes --enable_cameras. Meanwhile the startup check and _assert_camera_support_enabled both see false. legacy_environment_args_to_cli_args drops False values, so always assigning the field handles both cases:
environment_args["enable_cameras"] = cfg.enable_cameras
🤖 Isaac Lab-Arena Review BotSummaryThis cherry-picks #1829 into Findings🔴 Critical: isaaclab_arena/evaluation/experiment_runner.py:83: 🔵 Improvement: isaaclab_arena/evaluation/legacy_graph_environment_cli.py:65: An override only reaches a graph-spec Run when it turns cameras on. An override to Test Coverage and CI CostThe new tests don't start a SimulationApp and cover the local path. None of them feeds a serialized Experiment back into the runner, which is how OSMO calls it. A test in
From reading the code, this test would hit the new The rejection test sets up its own stub that fails if the simulator starts (line 638), copied from the Pre-commit and the uv check were still queued when I reviewed this, so I couldn't confirm the tests pass. VerdictSignificant concerns |
Release-only adaptation of a3bb7a2 on #1829. An OSMO task writes the typed Experiment to YAML with every default, including enable_cameras: false, and runs it with --record_camera_video, which OSMO turns on by default. The Experiment Runner rejected every such Run because it could not tell that default from an author's false. --record_camera_video now adds runs.<name>.environment.enable_cameras=true for every Run of a YAML Experiment whose value is not true, as policy_runner.py turns on its cameras, and prints those Runs. Signed-off-by: Xinjie Yao <[email protected]>
Cherry-pick #1829 into
release/0.4.0: turn on every Run's cameras whenexperiment_runner.py --record_camera_videois set. Replace theAttributeErrorfromCameraObsVideoRecorderwith a message that names the setting to change.