Repository navigation
Add Placement Success Benchmark - #1560
Conversation
1915e35 to
861da0b
Compare
[Low impact] The PR adds an opt-in benchmark workflow without changing normal environment builds. The PR appears safe to merge, with a non-blocking improvement needed to distinguish interrupted results from completed runs. Findings
SummaryAdds a placement benchmark that builds RoboLab and KitchenBench specs without stepping physics.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Discover selected specs] --> B[Build each spec for each seed]
B --> C[Read placement diagnostics]
C --> D[Add environment record]
D --> E[Save results]
E --> B
D --> F[Summarize suites]
F --> G[Exit nonzero if any spec failed]
Reviews (1) · Last reviewed commit: "clarify fallback and later-batch wording" · Reviewed by Greptile |
🤖 Isaac Lab-Arena Review BotSummaryThis revision drops the standalone runner and uses the normal Experiment flow:
My three earlier comments no longer apply: seeds are now set per Run, and both the provenance code and the placer-parameter copy are gone. What's left is small:
Findings🔵 Improvement: isaaclab_arena/evaluation/run_execution.py:172. The file can be written after 🔵 Improvement: docs/pages/concepts/object_placement/placement_success_benchmark.rst:26. Fallback uses the highest-ranked candidates: fewest failed checks first, then lowest loss. The docs call them the lowest-loss candidates. 🔵 Improvement: docs/pages/concepts/object_placement/placement_success_benchmark.rst:74. Only 🔵 Improvement: isaaclab_arena_benchmarking/tests/test_placement_success.py:90. The seed-spacing bound assumes no spec overrides 🔵 Improvement: .github/workflows/ci.yml:301. The PR description still calls the per-Run class Test Coverage and CI CostI could not confirm the new tests pass in CI or see how long the new RoboLab sim test takes. "Run tests" and "Run tests with subprocess" were still running on this head commit when I reviewed. The coverage gap I found is the unchecked placer-parameter assumption in the seed-spacing test, covered in the inline comment. VerdictMinor fixes needed |
1e7bc70 to
925de48
Compare
|
/review |
|
The PR changed while this review was running. Please run Requested in this comment. |
|
/review |
alexmillane
left a comment
There was a problem hiding this comment.
Looking much better.
I only have one major comment about separating the writing of diagnostics from the process of building the env.
3358aff to
399c56f
Compare
alexmillane
left a comment
There was a problem hiding this comment.
Thank you for adding this!
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
399c56f to
4c3d5f7
Compare
Signed-off-by: zhx06 <zihaox@nvidia.com>
…ctly Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Fix the placement pool fallback so it fills an environment's remaining slots when the last batch finds too few valid layouts. Native uv CI has failed on `main` since #1523 because of this. Also run `test_placement_success.py` in native uv CI, as Docker CI does. ## Why this change? With `allow_best_loss_fallbacks`, which is on by default, `PooledObjectPlacer` fell back only when its last batch had no valid layout. If the last batch had some valid layouts but too few, the build raised `Placement pool could not fill ...`. So finding one more valid layout could turn a passing build into a failing one. #1523 changed the candidate seeds, and the farmhouse2 banana spec now hits this in native uv CI. It finds 3 of 5 valid layouts, but its last batch has 1, so the build fails. Before #1523 it found 1, its last batch had none, and fallback filled the rest. ## What changes? - On the last batch, `PooledObjectPlacer` stores an environment's valid layouts first, then fills its remaining slots with best-loss layouts. With `allow_best_loss_fallbacks=False`, an environment that is still short still fails the build. The docs described the old rule and now describe the new one. - `uv-ci.yml` runs `isaaclab_arena_benchmarking/tests/test_placement_success.py`, as `ci.yml` has since #1560. ## Validation - A new test in `test_heterogeneous_placement.py` covers a last batch with too few valid layouts, with fallback on and off. Its fallback-on case fails on `main` and passes here. The placement test files pass in the Isaac Sim 6.2 container. - With the farmhouse2 spec limited to 3 placement attempts, seeds 0 and 7 fail on `main` and build with this change. This PR's native uv job runs the farmhouse2 test on the stack where it fails. `main`'s latest uv run also failed `test_droid_deformable_environment[physx]`, which this PR doesn't address. --------- Signed-off-by: zhx06 <zihaox@nvidia.com>
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()inrun_execution.pywritesplacement_diagnostics_rebuild<i>.jsonto the Run directory for every rebuild that solves relation placement. This applies to every Experiment, including policy evaluations.PlacementDiagnosticsgetsnum_envsandsave()/load().robolab_placement_experiment.yamlandkitchen_bench_placement_experiment.yamlinisaaclab_arena_benchmarking/experiment_configs/have one Run per spec, each with 30 environments, a zero-action policy and one step.placement_success.pyreads an Experiment output directory into oneRunPlacementRecordper Run and aPlacementSuccessSummary. 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.ci.ymlrunsisaaclab_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.yamlyet. They can be added together with placement KPI fields, which David plans to wire up.Validation
test_placement_diagnostics.py,test_run_execution.py,test_experiment_runner.pyandtest_arena_experiment_result.pypass 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.banana_on_plateand two KitchenBench specs, 30 environments) took 81 s throughexperiment_runner.pyon one GPU, from app start to the result file. The KitchenBench pick spec took the longest, about 50 s.