def load_state_from_peers(self, **kwargs):
    '\n        Attempt to load the newest collaboration state from other peers within the same run_id.\n\n        If successful, this will update parameters, optimizer state, local epoch and learning rate schedule in-place.\n        '
    if ((self.scheduled_grads is not None) and (not self.scheduled_grads.done())):
        self._tag_along_with_zero_weight(self.scheduled_grads)
        self.scheduled_grads = None
    self.state_averager.step(wait_for_delayed_updates=True)
    with self.tracker.pause_updates():
        while True:
            try:
                self.state_averager.load_state_from_peers(timeout=self.load_state_timeout, **kwargs)
                break
            except KeyboardInterrupt:
                raise
            except BaseException as e:
                logger.exception(f'Failed to load state from peers: {e}, retrying ...')
                continue
        if ((self.tracker.global_epoch - 1) <= self.local_epoch < self.tracker.global_epoch):
            logger.log(self.status_loglevel, f'Catching up with collaboration step {self.tracker.global_epoch}')
            self.state_averager.local_epoch = self.tracker.global_epoch
        self.tracker.report_local_progress(local_epoch=self.local_epoch, samples_accumulated=0)
        if (not self.client_mode):
            self.state_averager.state_sharing_priority = self.local_epoch
        if self.use_gradient_averaging:
            self.grad_averager.reset_accumulated_grads_()
            if (not self.client_mode):
                self.grad_averager.state_sharing_priority = self.local_epoch
Attempt to load the newest collaboration state from other peers within the same run_id.

If successful, this will update parameters, optimizer state, local epoch and learning rate schedule in-place.
def load_state_from_peers(self, **kwargs):
    '\n        Attempt to load the newest collaboration state from other peers within the same run_id.\n\n        If successful, this will update parameters, optimizer state, local epoch and learning rate schedule in-place.\n        '
    if ((self.scheduled_grads is not None) and (not self.scheduled_grads.done())):
        self._tag_along_with_zero_weight(self.scheduled_grads)
        self.scheduled_grads = None
    self.state_averager.step(wait_for_delayed_updates=True)
    with self.tracker.pause_updates():
        while True:
            try:
                self.state_averager.load_state_from_peers(timeout=self.load_state_timeout, **kwargs)
                break
            except KeyboardInterrupt:
                raise
            except BaseException as e:
                logger.exception(f'Failed to load state from peers: {e}, retrying ...')
                continue
        if ((self.tracker.global_epoch - 1) <= self.local_epoch < self.tracker.global_epoch):
            logger.log(self.status_loglevel, f'Catching up with collaboration step {self.tracker.global_epoch}')
            self.state_averager.local_epoch = self.tracker.global_epoch
        self.tracker.report_local_progress(local_epoch=self.local_epoch, samples_accumulated=0)
        if (not self.client_mode):
            self.state_averager.state_sharing_priority = self.local_epoch
        if self.use_gradient_averaging:
            self.grad_averager.reset_accumulated_grads_()
            if (not self.client_mode):
                self.grad_averager.state_sharing_priority = self.local_epoch