class_docstr: AutoMM is designed to simplify the fine-tuning of foundation models
  for downstream applications with just three lines of code.
  AutoMM seamlessly integrates with popular model zoos such as
  `HuggingFace Transformers <https://github.com/huggingface/transformers>`_,
  `TIMM <https://github.com/huggingface/pytorch-image-models>`_,
  and `MMDetection <https://github.com/open-mmlab/mmdetection>`_,
  accommodating a diverse range of data modalities,
  including image, text, tabular, and document data, whether used individually or in combination.
  It offers support for an array of tasks, encompassing classification, regression,
  object detection, named entity recognition, semantic matching, and image segmentation.
class_docstr_tok: ["AutoMM","is","designed","to","simplify","the","fine-tuning","of","foundation","models","for","downstream","applications","with","just","three","lines","of","code",".","AutoMM","seamlessly","integrates","with","popular","model","zoos","such","as","`","HuggingFace","Transformers","<","https",":","\/\/github.com\/huggingface\/transformers",">","`","_",",","`","TIMM","<","https",":","\/\/github.com\/huggingface\/pytorch-image-models",">","`","_",",","and","`","MMDetection","<","https",":","\/\/github.com\/open-mmlab\/mmdetection",">","`","_",",","accommodating","a","diverse","range","of","data","modalities",",","including","image",",","text",",","tabular",",","and","document","data",",","whether","used","individually","or","in","combination",".","It","offers","support","for","an","array","of","tasks",",","encompassing","classification",",","regression",",","object","detection",",","named","entity","recognition",",","semantic","matching",",","and","image","segmentation","."]
docstr: Evaluate the model on a given dataset.
  
  Parameters
  ----------
  data
      A pd.DataFrame, containing the same columns as the training data.
      Or a str, that is a path of the annotation file for detection.
  query_data
      Query data used for ranking.
  response_data
      Response data used for ranking.
  id_mappings
       Id-to-content mappings. The contents can be text, image, etc.
       This is used when data/query_data/response_data contain the query/response identifiers instead of their contents.
  metrics
      A list of metric names to report.
      If None, we only return the score for the stored `_eval_metric_name`.
  chunk_size
      Scan the response data by chunk_size each time. Increasing the value increases the speed, but requires more memory.
  similarity_type
      Use what function (cosine/dot_prod) to score the similarity (default: cosine).
  cutoffs
      A list of cutoff values to evaluate ranking.
  label
      The label column name in data. Some tasks, e.g., image<-->text matching, have no label column in training data,
      but the label column may be still required in evaluation.
  return_pred
      Whether to return the prediction result of each row.
  realtime
      Whether to do realtime inference, which is efficient for small data (default False).
      If provided None, we would infer it on based on the data modalities
      and sample number.
  eval_tool
      The eval_tool for object detection. Could be "pycocotools" or "torchmetrics".
  
  Returns
  -------
  A dictionary with the metric names and their corresponding scores.
  Optionally return a pd.DataFrame of prediction results.
docstr_tok: ["Evaluate","the","model","on","a","given","dataset",".","Parameters","--","--","--","--","--","data","A","pd.DataFrame",",","containing","the","same","columns","as","the","training","data",".","Or","a","str",",","that","is","a","path","of","the","annotation","file","for","detection",".","query_data","Query","data","used","for","ranking",".","response_data","Response","data","used","for","ranking",".","id_mappings","Id-to-content","mappings",".","The","contents","can","be","text",",","image",",","etc",".","This","is","used","when","data\/query_data\/response_data","contain","the","query\/response","identifiers","instead","of","their","contents",".","metrics","A","list","of","metric","names","to","report",".","If","None",",","we","only","return","the","score","for","the","stored","`","_eval_metric_name","`",".","chunk_size","Scan","the","response","data","by","chunk_size","each","time",".","Increasing","the","value","increases","the","speed",",","but","requires","more","memory",".","similarity_type","Use","what","function","(","cosine\/dot_prod",")","to","score","the","similarity","(","default",":","cosine",")",".","cutoffs","A","list","of","cutoff","values","to","evaluate","ranking",".","label","The","label","column","name","in","data",".","Some","tasks",",","e.g.",",","image","<","--",">","text","matching",",","have","no","label","column","in","training","data",",","but","the","label","column","may","be","still","required","in","evaluation",".","return_pred","Whether","to","return","the","prediction","result","of","each","row",".","realtime","Whether","to","do","realtime","inference",",","which","is","efficient","for","small","data","(","default","False",")",".","If","provided","None",",","we","would","infer","it","on","based","on","the","data","modalities","and","sample","number",".","eval_tool","The","eval_tool","for","object","detection",".","Could","be","``","pycocotools","''","or","``","torchmetrics","''",".","Returns","--","--","--","-","A","dictionary","with","the","metric","names","and","their","corresponding","scores",".","Optionally","return","a","pd.DataFrame","of","prediction","results","."]
code: def evaluate(
      self,
      data: Union[pd.DataFrame, dict, list, str],
      query_data: Optional[list] = None,
      response_data: Optional[list] = None,
      id_mappings: Optional[
          Union[Dict[str, Dict], Dict[str, pd.Series]]
      ] = None,
      metrics: Optional[Union[str, List[str]]] = None,
      chunk_size: Optional[int] = 1024,
      similarity_type: Optional[str] = "cosine",
      cutoffs: Optional[List[int]] = [1, 5, 10],
      label: Optional[str] = None,
      return_pred: Optional[bool] = False,
      realtime: Optional[bool] = False,
      eval_tool: Optional[str] = None,
  ):
      """
      Evaluate the model on a given dataset.
  
      Parameters
      ----------
      data
          A pd.DataFrame, containing the same columns as the training data.
          Or a str, that is a path of the annotation file for detection.
      query_data
          Query data used for ranking.
      response_data
          Response data used for ranking.
      id_mappings
           Id-to-content mappings. The contents can be text, image, etc.
           This is used when data/query_data/response_data contain the query/response identifiers instead of their contents.
      metrics
          A list of metric names to report.
          If None, we only return the score for the stored `_eval_metric_name`.
      chunk_size
          Scan the response data by chunk_size each time. Increasing the value increases the speed, but requires more memory.
      similarity_type
          Use what function (cosine/dot_prod) to score the similarity (default: cosine).
      cutoffs
          A list of cutoff values to evaluate ranking.
      label
          The label column name in data. Some tasks, e.g., image<-->text matching, have no label column in training data,
          but the label column may be still required in evaluation.
      return_pred
          Whether to return the prediction result of each row.
      realtime
          Whether to do realtime inference, which is efficient for small data (default False).
          If provided None, we would infer it on based on the data modalities
          and sample number.
      eval_tool
          The eval_tool for object detection. Could be "pycocotools" or "torchmetrics".
  
      Returns
      -------
      A dictionary with the metric names and their corresponding scores.
      Optionally return a pd.DataFrame of prediction results.
      """
      return self._learner.evaluate(
          data=data,
          metrics=metrics,
          return_pred=return_pred,
          realtime=realtime,
          eval_tool=eval_tool,
          query_data=query_data,
          response_data=response_data,
          id_mappings=id_mappings,
          chunk_size=chunk_size,
          similarity_type=similarity_type,
          cutoffs=cutoffs,
          label=label,
      )
  
imports: from __future__ import annotations
  import json
  import logging
  import os
  import warnings
  from typing import Dict, List, Optional, Union
  import pandas
  import transformers
  from autogluon.common.utils.log_utils import set_logger_verbosity, verbosity2loglevel
  from autogluon.core.metrics import Scorer
  from .constants import AUTOMM_TUTORIAL_MODE, FEW_SHOT_CLASSIFICATION, NER, OBJECT_DETECTION, OPEN_VOCABULARY_OBJECT_DETECTION, SEMANTIC_SEGMENTATION
  from .learners import BaseLearner, FewShotSVMLearner, MultiModalMatcher, NERLearner, ObjectDetectionLearner, SemanticSegmentationLearner
  from .problem_types import PROBLEM_TYPES_REG
  from .utils import get_dir_ckpt_paths
label_desc: Use image node_id 23 for calling the MultiModalPredictor obj's underlying member method code with example usage: obj.evaluate(data, query_data, response_data, id_mappings, metrics, chunk_size, similarity_type, cutoffs, label, return_pred, realtime, eval_tool) and returns: self