Closed sandeepnmenon closed 3 years ago
I think this issue is not directly related to TorchPack. You might be able to fix this issue by adding self.optimizer.consolidate_state_dict()
at the beginning of the _state_dict()
function inside the trainer.
Thank you @zhijian-liu . That worked.
I am training the SPVCNN model built using torchsparse and trained using torchpack wrapper. While trying to use ZeroRedundancyOptimizer as follows
and running training using the command
torchpack dist-run -np 1 python train.py configs/semantic_kitti/spvcnn/cr0p5.yaml --run-dir runs/test
I see the following warnings right before the checkpoints are saved WARNING:root:Optimizer state has not been consolidated. Returning the local state WARNING:root:Please call
consolidate_state_dict()
beforehand if you meant to save the global state