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: Ensure the columns required for the evaluation are present in the dataset.
  
  Args:
      data (`str` or [`Dataset`]):
          Specifies the dataset we will run evaluation on.
      columns_names (`List[str]`):
          List of column names to check in the dataset. The keys are the arguments to the [`evaluate.EvaluationModule.compute`] method,
          while the values are the column names to check.
  
  Example:
  
  ```py
  >>> from datasets import load_dataset
  >>> from evaluate import evaluator
  >>> data = load_dataset("rotten_tomatoes', split="train")
  >>> evaluator.check_required_columns(data, {"input_column": "text", "label_column": "label"})
  ```
docstr_tok: ["Ensure","the","columns","required","for","the","evaluation","are","present","in","the","dataset",".","Args",":","data","(","`","str","`","or","[","`","Dataset","`","]",")",":","Specifies","the","dataset","we","will","run","evaluation","on",".","columns_names","(","`","List","[","str","]","`",")",":","List","of","column","names","to","check","in","the","dataset",".","The","keys","are","the","arguments","to","the","[","`","evaluate.EvaluationModule.compute","`","]","method",",","while","the","values","are","the","column","names","to","check",".","Example",":","``","`","py",">",">",">","from","datasets","import","load_dataset",">",">",">","from","evaluate","import","evaluator",">",">",">","data","=","load_dataset","(","``","rotten_tomatoes","'",",","split=","''","train","''",")",">",">",">","evaluator.check_required_columns","(","data",",","{","``","input_column","''",":","``","text","''",",","``","label_column","''",":","``","label","''","}",")","``","`"]
code: def check_required_columns(
      self, data: Union[str, Dataset], columns_names: Dict[str, str]
  ):
      """
      Ensure the columns required for the evaluation are present in the dataset.
  
      Args:
          data (`str` or [`Dataset`]):
              Specifies the dataset we will run evaluation on.
          columns_names (`List[str]`):
              List of column names to check in the dataset. The keys are the arguments to the [`evaluate.EvaluationModule.compute`] method,
              while the values are the column names to check.
  
      Example:
  
      ```py
      >>> from datasets import load_dataset
      >>> from evaluate import evaluator
      >>> data = load_dataset("rotten_tomatoes', split="train")
      >>> evaluator.check_required_columns(data, {"input_column": "text", "label_column": "label"})
      ```
      """
      for input_name, column_name in columns_names.items():
          if column_name not in data.column_names:
              raise ValueError(
                  f"Invalid `{input_name}` {column_name} specified. The dataset contains the following columns: {data.column_names}."
              )
  
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 8 for calling the Evaluator obj's underlying member method code with example usage: obj.check_required_columns(data, columns_names) without return types