[fix] write the edex intrinsics key as size, not resolution - #152
Conversation
Intrinsics.resolution is declared with alias="size", but EDEXMetadata.write dumped the models without by_alias, so pydantic serialised the field name. Every file the writer produced carried "resolution" and then failed to load in both readers: EDEX_CAM_SIZE in libs/edex/edex_internal.h, and the key check in dataset_reader.py that raises KeyError: 'size'. This hit every producer going through EDEXMetadata.write, not just the RGB-D path. The existing round trip test missed it because the model sets populate_by_name, so reading the written file back accepts either spelling. The new test opens the raw json instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe EDEX writer now serializes Pydantic models with aliases. Camera intrinsics use the ChangesEDEX alias serialization
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to EDEX metadata now writes camera intrinsics with the required 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Test Results
cuVSLAM Evaluation KPIs
Artifacts |
Intrinsics.resolution is declared with alias="size", but EDEXMetadata.write dumped the models without by_alias, so pydantic serialised the field name. Every file the writer produced carried "resolution" and then failed to load in both readers: EDEX_CAM_SIZE in libs/edex/edex_internal.h, and the key check in dataset_reader.py that raises KeyError: 'size'. This hit every producer going through EDEXMetadata.write, not just the RGB-D path.
The existing round trip test missed it because the model sets populate_by_name, so reading the written file back accepts either spelling. The new test opens the raw json instead.
Summary by CodeRabbit
Bug Fixes
sizefield consistently.resolutionfield from generated EDEX JSON.Tests