def broadcast(self): broadcast_parameters(self._model.state_dict(), root_rank=0) broadcast_optimizer_state(self._optimizer, root_rank=0) self.global_completed_batch_num = broadcast_object( self.global_completed_batch_num, name="GlobalCompletedBatchNum")
def sync(self): broadcast_parameters(self.model.state_dict(), root_rank=0) broadcast_optimizer_state(self.optimizer, root_rank=0) super(TorchState, self).sync()
def sync(self): broadcast_parameters(self.value.state_dict(), root_rank=0)