fix(PTv3): checkpoint load for testing#192
Conversation
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in TesterBase.build_model() where checkpoint state dict keys were being processed using self.keywords and self.replacement attributes that don't exist on the TesterBase class (they belong to the CheckpointLoader hook). The code is reverted to the original working logic that correctly handles the "module." prefix based on whether DDP (multi-GPU) is being used.
Changes:
- Reverted the checkpoint key remapping logic in
TesterBase.build_model()to correctly handle single-GPU vs. multi-GPU "module." prefix without referencing nonexistent instance attributes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
mojomex
left a comment
There was a problem hiding this comment.
The fix works, but I'm not sure about the global "version" key. Other modules have their own version keys (not in PTv3 by the looks of it), and this could potentially cause unwanted side effects.
Fix is removing the explicit version setting.
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
mojomex
left a comment
There was a problem hiding this comment.
Nice solution, confirmed working.
Let's trigger docker build after this is merged.
Summary
Fixes loading of checkpoint for test - it reverts to the original code as it was before.
Set spconv version to "2" in order to avoid implicit conversion in mmdet3d.