class_docstr: Audio Video Transformer model for n-way classification.
class_docstr_tok: ["Audio","Video","Transformer","model","for","n-way","classification","."]
docstr: Returns a callable metric function for the model.
  
  Args:
    split: The split for which we calculate the metrics. It should be one
      of the ['train',  'validation', 'test'].
  Returns: A metric function with the following API: ```metrics_fn(logits,
    label, weights)```
docstr_tok: ["Returns","a","callable","metric","function","for","the","model",".","Args",":","split",":","The","split","for","which","we","calculate","the","metrics",".","It","should","be","one","of","the","[","'train","'",",","'validation","'",",","'test","'","]",".","Returns",":","A","metric","function","with","the","following","API",":","``","`","metrics_fn","(","logits",",","label",",","weights",")","``","`"]
code: def get_metrics_fn(
      self, split: Optional[str] = None
  ) -> base_model.MetricFn:
      """Returns a callable metric function for the model.
  
      Args:
        split: The split for which we calculate the metrics. It should be one
          of the ['train',  'validation', 'test'].
      Returns: A metric function with the following API: ```metrics_fn(logits,
        label, weights)```
      """
      del split  # for all splits, we return the same metric functions
  
      return functools.partial(
          classification_model.classification_metrics_function,
          target_is_onehot=self.dataset_meta_data.get(
              "target_is_onehot", False
          ),
          metrics=_MBT_CLASSIFICATION_METRICS,
      )
  
imports: import functools
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple
  from absl import logging
  import flax.linen
  from flax.linen.linear import default_kernel_init
  from immutabledict import immutabledict
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.base_models import base_model
  from scenic.model_lib.base_models import classification_model
  from scenic.model_lib.base_models import model_utils
  from scenic.model_lib.base_models.classification_model import ClassificationModel
  from scenic.model_lib.layers import attention_layers
  from scenic.model_lib.layers import nn_layers
  from scenic.projects.baselines import vit
  from scenic.projects.mbt import model_utils
label_desc: Use image node_id 3 for calling the MBTClassificationModel obj's underlying member method code with example usage: obj.get_metrics_fn(split) and returns: functools