class_docstr: Interface for an offline evaluator of a policy
class_docstr_tok: ["Interface","for","an","offline","evaluator","of","a","policy"]
docstr: Calculates the estimate of the metrics based on the given offline dataset.
  
  Typically, the dataset is passed through only once via n_parallel tasks in
  mini-batches to improve the run-time of metric estimation.
  
  Args:
      dataset: The ray dataset object to do offline evaluation on.
      n_parallelism: The number of parallelism to use for the computation.
  
  Returns:
      Dict[str, Any]: A dictionary of the estimated values.
docstr_tok: ["Calculates","the","estimate","of","the","metrics","based","on","the","given","offline","dataset",".","Typically",",","the","dataset","is","passed","through","only","once","via","n_parallel","tasks","in","mini-batches","to","improve","the","run-time","of","metric","estimation",".","Args",":","dataset",":","The","ray","dataset","object","to","do","offline","evaluation","on",".","n_parallelism",":","The","number","of","parallelism","to","use","for","the","computation",".","Returns",":","Dict","[","str",",","Any","]",":","A","dictionary","of","the","estimated","values","."]
code: def estimate_on_dataset(
      self,
      dataset: Dataset,
      *,
      n_parallelism: int = os.cpu_count(),
  ) -> Dict[str, Any]:
      """Calculates the estimate of the metrics based on the given offline dataset.
  
      Typically, the dataset is passed through only once via n_parallel tasks in
      mini-batches to improve the run-time of metric estimation.
  
      Args:
          dataset: The ray dataset object to do offline evaluation on.
          n_parallelism: The number of parallelism to use for the computation.
  
      Returns:
          Dict[str, Any]: A dictionary of the estimated values.
      """
  
file_path: ray/rllib/offline/offline_evaluator.py
imports: import abc
  import os
  import logging
  from typing import Dict, Any
  from ray.data import Dataset
  from ray.rllib.policy import Policy
  from ray.rllib.utils.annotations import DeveloperAPI, ExperimentalAPI
  from ray.rllib.utils.typing import SampleBatchType
label_desc: Use image node_id 4 for calling the OfflineEvaluator obj's underlying member method code with example usage: obj.estimate_on_dataset(dataset) without return types