Repository navigation
Add placement diagnostics - #1556
Conversation
[Low impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds placement diagnostics from individual checks through pool fills to the environment builder.
No actionable issues were found. Tests were inspected but not run. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
V["PlacementValidationRunner"] -->|"BatchValidationDiagnostics"| O["ObjectPlacer"]
O -->|"Each solved batch"| P["PooledObjectPlacer"]
P -->|"Latest fill record"| B["ArenaEnvBuilder.placement_diagnostics"]
P -->|"Batch summaries"| E["Pool-fill error"]
Reviews (1) · Last reviewed commit: "rename variables/functions" · Reviewed by Greptile |
🤖 Isaac Lab-Arena Review BotSummaryThe validation runner now returns per-check pass counts. The pool keeps those counts for each fill and adds them to the fill-failure error, so a failed placement names the check that rejected its candidates. This is a small, useful change. My main question is whether Design, Boundaries & Scope🔵 Separately, the "Diagnosing Placement" docs say that fills during resets record counts too, but they don't say how to read them. Pointing readers to Findings🔵 Improvement: isaaclab_arena/environments/arena_env_builder.py:131: the builder stores a second copy of the pool's diagnostics (see above). Test Coverage and CI Cost
VerdictMinor fixes needed |
alexmillane
left a comment
There was a problem hiding this comment.
Looking pretty good. A couple of comments:
- Our agents are requesting per-object/asset information. For example if a placement fails because two objects are in collision, that is the kind of information that the agents want.
- We need some way of getting the diagnostics out. I'm wondering if we can output to the output folder when running the experiment runner, in a placer-specific, run-specific log.
These can be addressed in follow up MRs.
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
e586a18 to
068c9f4
Compare
Write each Run's placement diagnostics to its output directory, and add RoboLab and KitchenBench Experiments that measure placement success with the normal experiment runner. This replaces the standalone benchmark runner from the first revision of this PR. ## Why this change? A placement change can help one scene and hurt another, and a few hand-picked scenes don't show that. #1556 made each environment build record per-check validation counts, but the experiment runner dropped them after the build. This PR keeps them, so placement success can be measured across all the maintained specs. ## What changes? - `_build_environment_from_cfg()` in `run_execution.py` writes `placement_diagnostics_rebuild<i>.json` to the Run directory for every rebuild that solves relation placement. This applies to every Experiment, including policy evaluations. - `PlacementDiagnostics` gets `num_envs` and `save()` / `load()`. - `robolab_placement_experiment.yaml` and `kitchen_bench_placement_experiment.yaml` in `isaaclab_arena_benchmarking/experiment_configs/` have one Run per spec, each with 30 environments, a zero-action policy and one step. - Each Run has its own placement seed, 100000 apart, so tasks that share a scene solve different candidates. - Tests check that each experiment lists every spec in its folder and that no two Runs share candidate seeds. - `placement_success.py` reads an Experiment output directory into one `RunPlacementRecord` per Run and a `PlacementSuccessSummary`. It reports: - `valid_candidate_rate_first_batch`: the share of the first batch that passes every required check. - `valid_env_rate_after_retries`: the share of environments that need no best-loss fallback. - `batches_per_build`. - The docs page explains what is measured and how to run it. - `ci.yml` runs `isaaclab_arena_benchmarking/tests/test_placement_success.py`. Each Run builds its spec once. On `main`, the rebuilds of a Run get the same placement seed, so more rebuilds would repeat the same candidates. Once rebuilds get their own seeds (after #1523), the Experiments can use more rebuilds. The experiments are not in `tracked_benchmarks.yaml` yet. They can be added together with placement KPI fields, which David plans to wire up. ## Validation - The new tests, `test_placement_diagnostics.py`, `test_run_execution.py`, `test_experiment_runner.py` and `test_arena_experiment_result.py` pass locally, with the camera test run in its own process as in CI. That includes one test that runs a one-Run placement Experiment and reads its diagnostics back. - Three real Runs (`banana_on_plate` and two KitchenBench specs, 30 environments) took 81 s through `experiment_runner.py` on one GPU, from app start to the result file. The KitchenBench pick spec took the longest, about 50 s. - My local image has no cuRobo v2, so these ran on the core from before #1550 with this PR's changes applied. CI covers the current image. - The full 80-spec Experiments have not been run yet. --------- Signed-off-by: zhx06 <zihaox@nvidia.com>
Return per-check validation counts from relation placement and keep them for each pool fill. A pool that can't fill now says which check rejected its candidates, and
ArenaEnvBuilder.placement_diagnosticsholds the counts after a build.Why this change?
When the placement pool can't fill, the error only lists how many layouts each env has. The validation runner prints per-check pass counts to the log but doesn't return them, so code can't read them and you have to search the log to find the failing check.
What changes?
PlacementValidationRunner.validate_candidates()returns aBatchValidationDiagnostics: the number of candidates, how many passed every required check, and aValidationCheckDiagnosticsper check with how many candidates it ran on and how many passed.ObjectPlacer.last_batch_validation_diagnosticskeeps the latest one. The log line is unchanged.PooledObjectPlacer.last_fill_diagnosticsholds every batch of the most recent fill and the envs that fell back to best-loss layouts.ArenaEnvBuilder.placement_diagnosticsholds the fill made during the latestbuild_env_cfg(), orNoneif that build solved no relations or failed.Fill-failure errors end with one line per batch:
The pooled placement docs get a "Diagnosing Placement" section.
A follow-up PR adds a placement benchmark that reports these counts across scenes.
Validation
test_placement_diagnostics.pycovers the first batch's counts, refills, fallbacks, the failure message, and clearing the field when a rebuild fails.test_clutter_on.pychecks the counts of checks that run on only some candidates.ik_reachableisn't tested, because the dev container has no cuRobo.