def METHOD_NAME(self, state: Dict[str, int]):
    """
    Restore the uncompleted shards from a checkpoint. The shard
    client will send uncompleted shards to the DLRover job master.
    The master will assign those shards to workers to restore training.
    """
    self.epoch = int(state.get("epoch", 0))
    completed_num = int(state.get("completed_num", 0))
    self.num_samples = int(
        (self.total_size - completed_num) / self.num_replicas
    )
    if completed_num > self.total_size:
        completed_num = completed_num % self.total_size
    self._epoch_checkpoint[self.epoch] = completed_num
    logger.info(
        "Load epoch = %s, completed num = %s, num_samples = %s",
        self.epoch,
        completed_num,
        self.num_samples,
    )