Repository navigation
Cache Lightwheel assets on disk and in CI - #1740
Conversation
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
The SDK writes null when the server omits versionUuid, which made an already downloaded floorplan a permanent cache miss. Check for the key instead of its truthiness; a missing key is still a miss. Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Pass lightwheel: 'true' to setup-caches in the jobs whose tests fetch Lightwheel assets, and call save-caches as the last step of every job that calls setup-caches (it also reports the kit and Warp caches). Widen the helper test discovery to test_report_*.py. Job -> test file mapping (Lightwheel users only): - tests (not with_cameras and not with_subprocess and not with_newton): test_kitchen_bench_yaml_env.py (no markers, builds kitchen_bench envs), test_lightwheel.py and test_usd_sources.py (Lightwheel source/acquire), test_usd_prim_tree.py (Lightwheel Robocasa kitchen USD) - tests_with_subprocess (with_subprocess and not with_newton): test_object_control_kitchen.py (kitchen_bench_lightwheel_* YAMLs) - gr00t: no Lightwheel use (galileo_g1_locomanip_pick_and_place, brown_box); it calls save-caches with the same if as setup-caches, without lightwheel. Signed-off-by: David Tingdahl <[email protected]>
Exclude object/*.zip (left behind by the SDK after extraction) from the Lightwheel cache path list in both setup-caches and save-caches, add a warning fallback to the Lightwheel compare step so a helper crash cannot fail a green job, and correct the comments: the credential is the login/ directory holding account.json. Signed-off-by: David Tingdahl <[email protected]>
LightwheelUsdSource and LightwheelFloorplanUsdSource repeated the same memo, cache lookup, hit/miss logging, SDK call and path check. Move that flow into LightwheelAssetSource, which the two classes extend. Each subclass now supplies four hooks: the log key, the cached-path lookup, the lazily imported SDK loader, and the loader method that fetches the asset. Public names, constructor arguments and behaviour are unchanged. Share the floorplan cache directory name between the lookup and the log key, and add tests for the base class's hit, miss, not-cacheable and memo paths, including the log lines. Signed-off-by: David Tingdahl <[email protected]>
The object and floorplan lookups were module-level functions that each source class called from its _find_cached_usd hook. Put each lookup in its class's hook instead, and give the floorplan class a _cache_name method that the lookup and the log key share. The module keeps only the cache root, the base class, the two sources and the retry helper. Behaviour is unchanged. The lookup tests now go through the source classes. Signed-off-by: David Tingdahl <[email protected]>
Rename LightwheelAssetSource to LightwheelSource and LightwheelUsdSource to LightwheelObjectUsdSource. The two concrete classes are now LightwheelObjectUsdSource and LightwheelFloorplanUsdSource, both extending LightwheelSource, so the object class no longer looks like the general one. LightwheelUsdSource is no longer defined; update its seven uses in object_library.py and the tests. The v0.4 migration guide still names LightwheelUsdSource and is not changed here. Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Rename the cache and download hooks with a get_ prefix, add a module constant for the SDK cache path, return once from the cache-or-download method, and document the constructor arguments. Signed-off-by: David Tingdahl <[email protected]>
…rop cache reporting Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
[Medium impact] The changes reach Lightwheel asset loading and the CI test jobs that share the cache action. The PR appears safe to merge, with non-blocking fixes recommended for the migration example and real-cache test coverage. FindingsSummaryAdds disk-first lookup for Lightwheel objects and floorplans, pins broccoli to one variant, and includes Lightwheel assets in CI caches.
Cache size: david-tingdahl-nvidia explicitly acknowledged the repository's cache limit and the added storage per merge; no duplicate finding is reported. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Resolve Lightwheel source] --> B{Path already remembered?}
B -->|Yes| F[Return local path]
B -->|No| C{Complete disk cache found?}
C -->|Yes| E[Remember local path]
C -->|No| D[Download through SDK with retries]
D --> E
E --> F
Reviews (1) · Last reviewed commit: "Define the cache paths once in setup-cac..." · Reviewed by Greptile |
🤖 Isaac Lab-Arena Review BotSummaryThe Lightwheel object and floorplan sources now return a complete copy from the SDK's disk cache without calling the Lightwheel API. Design, Boundaries & Scope
Findings🟡 Warning: isaaclab_arena/assets/sources/lightwheel.py:82 — Cache hits never refresh assets that Lightwheel has since updated, and the log line doesn't record which version was used. Consider making cache-first opt-in, or at least print the version. An existing comment already covers the stale Test Coverage and CI Cost
VerdictMinor fixes needed |
Signed-off-by: David Tingdahl <[email protected]>
…te the migration guide Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
alexmillane
left a comment
There was a problem hiding this comment.
Looks awesome!
A few tiny nits.
…s, comment cache lookup Signed-off-by: David Tingdahl <[email protected]>
Update five Lightwheel fixtures to use `LightwheelObjectUsdSource`. ## Why this change? The fixtures added in #1562 still reference `LightwheelUsdSource` after #1740 renamed the class. The first stale reference raises `NameError` when Python imports `object_library.py`. Flake8 reports all five references as `F821`. ## What changes? Switch the two blenders, stand mixer, toaster, and toaster oven to the source class already used by the other Lightwheel fixtures. Keep their asset names and constructor arguments as-is.
Use Lightwheel assets from the local SDK cache without calling the Lightwheel servers, and cache them in CI together with the kit and Warp caches.
Why this change?
CI tests that use Lightwheel assets keep failing because of the Lightwheel servers (gateway 504s, certificate errors on the asset download), not because of the code under test. The Lightwheel SDK has a disk cache, but it asks the server for the current version before it looks at the disk, so a cached file still needs the API to be up.
What changes?
Lightwheel assets
-Refactored existing LightWheel classes to reduce duplication of cache management code.
-Renamed
LightwheelUsdSource->LightwheelObjectUsdSourceto better distinguish between Object and FloorplanCI
Validation