class_docstr: Wrapper class for Hugging Face Transformers PyTorch T5 model.
class_docstr_tok: ["Wrapper","class","for","Hugging","Face","Transformers","PyTorch","T5","model","."]
docstr: Retrieve the steps corresponding to all checkpoints in `model_dir`.
  
  Args:
    model_dir: str, the directory of the checkpoints or None to use this
      model's directory.
  
  Returns:
    A list of ints corresponding to all checkpoint steps, or None if there
      are no checkpoints in the model directory.
docstr_tok: ["Retrieve","the","steps","corresponding","to","all","checkpoints","in","`","model_dir","`",".","Args",":","model_dir",":","str",",","the","directory","of","the","checkpoints","or","None","to","use","this","model","'s","directory",".","Returns",":","A","list","of","ints","corresponding","to","all","checkpoint","steps",",","or","None","if","there","are","no","checkpoints","in","the","model","directory","."]
code: def get_all_checkpoint_steps(self, model_dir=None):
      """Retrieve the steps corresponding to all checkpoints in `model_dir`.
  
      Args:
        model_dir: str, the directory of the checkpoints or None to use this
          model's directory.
  
      Returns:
        A list of ints corresponding to all checkpoint steps, or None if there
          are no checkpoints in the model directory.
      """
      model_dir = model_dir or self._model_dir
      checkpoint_files = tf.io.gfile.glob(
          os.path.join(model_dir, CHECKPOINT_FILE_FORMAT.format("*"))
      )
      if not checkpoint_files:
          return
      step_regex = re.compile(
          ".*" + CHECKPOINT_FILE_FORMAT.format(r"(\d+)")
      )
      steps = [
          int(step_regex.match(path).group(1))
          for path in checkpoint_files
      ]
      return sorted(steps)
  
imports: import functools
  import itertools
  import os
  import re
  import time
  from absl import logging
  import mesh_tensorflow.transformer.dataset
  import seqio
  import t5.data
  from t5.models import utils
  from t5.models.t5_model import T5Model
  import tensorflow.compat.v1
  import tensorflow_datasets
  import torch
  import torch.utils.tensorboard
label_desc: Use image node_id 6 for calling the HfPyTorchModel obj's underlying member method code with example usage: obj.get_all_checkpoint_steps(model_dir) and returns: sorted