You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 587fc82
Browse filesBrowse the repository at this point in the historyBrowse files
Declare semantic inclusion matches and select compact clone worlds (#9156)
## Description
Multi-asset spawners can expose an enormous Cartesian product even when
a task only needs a few compatible worlds. Declare compatibility with
existing semantic tags and keep the legal choices compact until scene
planning selects concrete worlds.
```python
InclusionSet(assets=["gear", "fixture"], match_tags=["size", "assembly"])
```
- `InclusionSet` owns only asset membership, inclusion weight, and
matching tag types. No matching subclass, override method, positional
layouts, separate labels, environment count, or random seed is required.
- Selected variants must share a value for each requested tag type. A
universal fixture can list several `size` values. Repeat asset names for
cardinality; all selected instances share the requested tags. Unclaimed
assets remain independent. This expresses shared compatibility, not
separate pairwise constraints or sampling without replacement.
- Scene planning reads individual spawner tags, including inherited
wrapper tags, and resolves compatible tag-value groups. Each slot
retains its candidate prototype IDs instead of expanding every concrete
combination.
- `make_clone_plan` uses the existing scene clone strategy to select
groups and each slot's candidates, materializes only selected worlds,
and reuses identical concrete prototypes. Inclusion weights split
equally across compatible groups. Multi-valued tags can make groups
overlap; this is group-weighted selection, not uniform sampling over the
exhaustive union of concrete worlds.
- Without matching tags, retain the existing independent product and
assignment behavior.
- Replication execution remains unchanged. `ReplicateSession` only
receives broader type annotations for forwarding compact definitions;
inclusion interpretation stays outside it.
This is the generic prerequisite. Downstream task-manager,
heterogeneous-task, and VLA evaluation example changes (#9161, #9165 and
#9184 ) need to adopt the declarative API when restacked.
## Validation
- 36 clone-plan algebra tests, 17 replication-session tests, and one
Newton native asset test passed (54 total).
- Tests cover multi-valued universal tags, multiple matching tag types,
repeated instances, independent unclaimed assets, collection columns,
mixed concrete/factorized definitions, prototype reuse, invalid choices,
and external random-seed reproducibility.
- A case with 1,000 variants, five categories, and eight slots retained
five groups rather than expanding `5 * 200**8` concrete worlds; planning
128 environments created at most 128 concrete world prototypes.
- A standalone scene-planning check passed for collection members,
shared offsets, concrete MultiUsd candidates, inherited tags, and source
preservation. The Isaac Sim scene test cannot launch without its runtime
in this checkout.
- Removing inherited tag propagation makes the native regression fail;
restored code passes.
- Local planning benchmark: approximately 4.37 ms to resolve the
1,000-variant case and 0.85 ms to select 128 worlds, with about 510 KiB
peak Python planning allocation. This measures planning, not asset
loading or simulation.
- Full formatting checks and a file-by-file structural audit passed,
including unchanged replication execution after stripping annotations.
---------
Co-authored-by: Octi Zhang <zhengyuz@nvidia.com>
0 commit comments