class_docstr: Wrapper class for Mesh-TF models.
class_docstr_tok: ["Wrapper","class","for","Mesh-TF","models","."]
docstr: Evaluate the model on the given Mixture or Task.
  
  Args:
    mixture_or_task_name: str, the name of the Mixture or Task to evaluate on.
      Must be pre-registered in the global `TaskRegistry` or
      `MixtureRegistry.`
    checkpoint_steps: int, list of ints, or None. If an int or list of ints,
      evaluation will be run on the checkpoint files in `model_dir` whose
      global steps are closest to the global steps provided. If None, run eval
      continuously waiting for new checkpoints. If -1, get the latest
      checkpoint from the model directory.
    summary_dir: str, path to write TensorBoard events file summaries for
      eval. If None, use model_dir/eval_{split}.
    split: str, the mixture/task split to evaluate on.
    eval_with_score: bool, whether to evaluate using log likelihood scores of
      targets instead of decoded predictions.
    compute_sequence_length: bool, automatically compute maximum sequence
      length to use during eval mode.
docstr_tok: ["Evaluate","the","model","on","the","given","Mixture","or","Task",".","Args",":","mixture_or_task_name",":","str",",","the","name","of","the","Mixture","or","Task","to","evaluate","on",".","Must","be","pre-registered","in","the","global","`","TaskRegistry","`","or","`","MixtureRegistry.","`","checkpoint_steps",":","int",",","list","of","ints",",","or","None",".","If","an","int","or","list","of","ints",",","evaluation","will","be","run","on","the","checkpoint","files","in","`","model_dir","`","whose","global","steps","are","closest","to","the","global","steps","provided",".","If","None",",","run","eval","continuously","waiting","for","new","checkpoints",".","If","-1",",","get","the","latest","checkpoint","from","the","model","directory",".","summary_dir",":","str",",","path","to","write","TensorBoard","events","file","summaries","for","eval",".","If","None",",","use","model_dir\/eval_","{","split","}",".","split",":","str",",","the","mixture\/task","split","to","evaluate","on",".","eval_with_score",":","bool",",","whether","to","evaluate","using","log","likelihood","scores","of","targets","instead","of","decoded","predictions",".","compute_sequence_length",":","bool",",","automatically","compute","maximum","sequence","length","to","use","during","eval","mode","."]
code: def eval(
      self,
      mixture_or_task_name,
      checkpoint_steps=None,
      summary_dir=None,
      split="validation",
      eval_with_score=False,
      compute_sequence_length=True,
  ):
      """Evaluate the model on the given Mixture or Task.
  
      Args:
        mixture_or_task_name: str, the name of the Mixture or Task to evaluate on.
          Must be pre-registered in the global `TaskRegistry` or
          `MixtureRegistry.`
        checkpoint_steps: int, list of ints, or None. If an int or list of ints,
          evaluation will be run on the checkpoint files in `model_dir` whose
          global steps are closest to the global steps provided. If None, run eval
          continuously waiting for new checkpoints. If -1, get the latest
          checkpoint from the model directory.
        summary_dir: str, path to write TensorBoard events file summaries for
          eval. If None, use model_dir/eval_{split}.
        split: str, the mixture/task split to evaluate on.
        eval_with_score: bool, whether to evaluate using log likelihood scores of
          targets instead of decoded predictions.
        compute_sequence_length: bool, automatically compute maximum sequence
          length to use during eval mode.
      """
      _parse_operative_config(self._model_dir)
  
      summary_dir = summary_dir or os.path.join(
          self._model_dir, "{}_eval".format(split)
      )
  
      checkpoint_steps = utils.get_checkpoints_iterator(
          checkpoint_steps, self._model_dir
      )
  
      def _get_task_eval_dataset(task, sequence_length, split):
          eval_datasets = mesh_transformer.mesh_eval_dataset_fn(
              sequence_length=sequence_length,
              dataset_split=split,
              mixture_or_task_name=task.name,
          )
  
          return eval_datasets[0].dataset_fn()
  
      utils.run_eval(
          mixture_or_task_name=mixture_or_task_name,
          predict_or_score_fn=functools.partial(
              self._predict_or_score_fn,
              eval_with_score=eval_with_score,
              split=split,
          ),
          checkpoint_steps=checkpoint_steps,
          dataset_fn=_get_task_eval_dataset,
          summary_dir=summary_dir,
          split=split,
          sequence_length=(
              None if compute_sequence_length else self._sequence_length
          ),
          batch_size=self._batch_size,
      )
  
imports: import functools
  import os
  import gin
  import gin.tf
  import mesh_tensorflow
  from mesh_tensorflow import optimize
  from mesh_tensorflow.transformer import dataset
  from mesh_tensorflow.transformer import learning_rate_schedules
  from mesh_tensorflow.transformer import utils
  from t5.models import mesh_transformer
  from t5.models import utils
  from t5.models.t5_model import T5Model
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the MtfModel obj's underlying member method code with example usage: obj.eval(mixture_or_task_name, checkpoint_steps, summary_dir, split, eval_with_score, compute_sequence_length) and returns: eval_datasets