class_docstr: The [`Evaluator`] class is the class from which all evaluators inherit. Refer to this class for methods shared across
  different evaluators.
  Base class implementing evaluator operations.
class_docstr_tok: ["The","[","`","Evaluator","`","]","class","is","the","class","from","which","all","evaluators","inherit",".","Refer","to","this","class","for","methods","shared","across","different","evaluators",".","Base","class","implementing","evaluator","operations","."]
docstr: A utility function computing time performance metrics:
      - `total_time_in_seconds` - pipeline inference runtime for the evaluation data in seconds,
      - `samples_per_second` - pipeline throughput in the number of samples per second.
      - `latency_in_seconds` - pipeline inference runtime for the evaluation data in seconds per sample,
docstr_tok: ["A","utility","function","computing","time","performance","metrics",":","-","`","total_time_in_seconds","`","-","pipeline","inference","runtime","for","the","evaluation","data","in","seconds",",","-","`","samples_per_second","`","-","pipeline","throughput","in","the","number","of","samples","per","second",".","-","`","latency_in_seconds","`","-","pipeline","inference","runtime","for","the","evaluation","data","in","seconds","per","sample",","]
code: def _compute_time_perf(
      start_time: float, end_time: float, num_samples: int
  ) -> Dict[str, Any]:
      """
      A utility function computing time performance metrics:
          - `total_time_in_seconds` - pipeline inference runtime for the evaluation data in seconds,
          - `samples_per_second` - pipeline throughput in the number of samples per second.
          - `latency_in_seconds` - pipeline inference runtime for the evaluation data in seconds per sample,
  
      """
      latency = end_time - start_time
      throughput = num_samples / latency
      latency_sample = 1.0 / throughput
  
      return {
          "total_time_in_seconds": latency,
          "samples_per_second": throughput,
          "latency_in_seconds": latency_sample,
      }
  
imports: from abc import ABC, abstractmethod
  from numbers import Number
  from typing import Any, Callable, Dict, List, Optional, Union
  from datasets import Dataset, load_dataset
  from evaluate.evaluator.utils import choose_split
  from time import perf_counter
  from typing_extensions import Literal
  from ..loading import load
  from ..module import EvaluationModule
  from ..utils.logging import get_logger
  from .utils import DatasetColumn
label_desc: Use image node_id 3 for calling the Evaluator obj's underlying member method code with example usage: obj._compute_time_perf(start_time, end_time, num_samples) and returns: dict