    def _find_all_checkpoints(self) -> Set[Tuple[int, int]]:
        """Returns a set of integers, each of which is a number of batches that were completed at the
        time a checkpoint wsa saved."""
        checkpoints = set()
        pattern = (
            f"model_state_e*_b*_w{self._rank}.th"
            if self.state_is_sharded
            else "model_state_e*_b*.th"
        )
        for model_state_file in glob.iglob(os.path.join(self._serialization_dir, pattern)):
            point_in_time = self._parse_model_state_path(model_state_file)
            if point_in_time is None:
                continue
            else:
                checkpoints.add(point_in_time)
        return checkpoints
Returns a set of integers, each of which is a number of batches that were completed at the
time a checkpoint wsa saved.
allennlp/training/checkpointer.py