class_docstr: A set of ``Result`` objects for interacting with Ray Tune results.
  
  You can use it to inspect the trials and obtain the best result.
  
  The constructor is a private API. This object can only be created as a result of
  ``Tuner.fit()``.
  
  Example:
  .. testcode::
  
      import random
      from ray import train, tune
      def random_error_trainable(config):
          if random.random() < 0.5:
              return {"loss": 0.0}
          else:
              raise ValueError("This is an error")
      tuner = tune.Tuner(
          random_error_trainable,
          run_config=train.RunConfig(name="example-experiment"),
          tune_config=tune.TuneConfig(num_samples=10),
      )
      try:
          result_grid = tuner.fit()
      except ValueError:
          pass
      for i in range(len(result_grid)):
          result = result_grid[i]
          if not result.error:
                  print(f"Trial finishes successfully with metrics"
                     f"{result.metrics}.")
          else:
                  print(f"Trial failed with error {result.error}.")
  
  .. testoutput::
      :hide:
  
      ...
  
  You can also use ``result_grid`` for more advanced analysis.
  
  >>> # Get the best result based on a particular metric.
  >>> best_result = result_grid.get_best_result( # doctest: +SKIP
  ...     metric="loss", mode="min")
  >>> # Get the best checkpoint corresponding to the best result.
  >>> best_checkpoint = best_result.checkpoint # doctest: +SKIP
  >>> # Get a dataframe for the last reported results of all of the trials
  >>> df = result_grid.get_dataframe() # doctest: +SKIP
  >>> # Get a dataframe for the minimum loss seen for each trial
  >>> df = result_grid.get_dataframe(metric="loss", mode="min") # doctest: +SKIP
  
  Note that trials of all statuses are included in the final result grid.
  If a trial is not in terminated state, its latest result and checkpoint as
  seen by Tune will be provided.
  
  See :doc:`/tune/examples/tune_analyze_results` for more usage examples.
docstr: Returns the exceptions of errored trials.
docstr_tok: ["Returns","the","exceptions","of","errored","trials","."]
code: def errors(self):
      """Returns the exceptions of errored trials."""
      return [result.error for result in self if result.error]
  
imports: import os
  import pandas
  import pyarrow
  from typing import Optional, Union
  from ray.air.result import Result
  from ray.cloudpickle import cloudpickle
  from ray.exceptions import RayTaskError
  from ray.tune.analysis import ExperimentAnalysis
  from ray.tune.error import TuneError
  from ray.tune.experiment import Trial
  from ray.util import PublicAPI
label_desc: Use image node_id 8 for calling the ResultGrid obj's underlying member method code with example usage: obj.errors() and returns: unknown