class_docstr: Wrapper class for Hugging Face Transformers PyTorch T5 model.
class_docstr_tok: ["Wrapper","class","for","Hugging","Face","Transformers","PyTorch","T5","model","."]
docstr: Load the model parameters from a checkpoint at a given step.
  
  Args:
    step: int, load the checkpoint from this training step.
    model_dir: str, the directory of the checkpoint to load or None to use
      this model's directory.
docstr_tok: ["Load","the","model","parameters","from","a","checkpoint","at","a","given","step",".","Args",":","step",":","int",",","load","the","checkpoint","from","this","training","step",".","model_dir",":","str",",","the","directory","of","the","checkpoint","to","load","or","None","to","use","this","model","'s","directory","."]
code: def load_checkpoint(self, step, model_dir=None):
      """Load the model parameters from a checkpoint at a given step.
  
      Args:
        step: int, load the checkpoint from this training step.
        model_dir: str, the directory of the checkpoint to load or None to use
          this model's directory.
      """
      model_dir = model_dir or self._model_dir
      path = os.path.join(
          model_dir, CHECKPOINT_FILE_FORMAT.format(step)
      )
      logging.info("Loading from %s", path)
      self._model.load_state_dict(torch.load(path))
      self._step = step
  
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 5 for calling the HfPyTorchModel obj's underlying member method code with example usage: obj.load_checkpoint(step, model_dir) without return types