class_docstr: NoneTrainer is a trainer that does not train a model, only runs evaluation.
class_docstr_tok: ["NoneTrainer","is","a","trainer","that","does","not","train","a","model",",","only","runs","evaluation","."]
docstr: Runs evaluation over training, validation, and test sets.
  
  Also:
  - Prints results, saves results to the progress tracker.
  - Saves the model if the validation score is the best so far
  - If there is no validation set, the model is always saved.
  
  Returns whether the trainer should early stop, based on validation metrics history.
code: def run_evaluation(
      self,
      training_set: Union["Dataset", "RayDataset"],  # noqa: F821
      validation_set: Optional[
          Union["Dataset", "RayDataset"]
      ],  # noqa: F821
      test_set: Optional[Union["Dataset", "RayDataset"]],  # noqa: F821
      progress_tracker: ProgressTracker,
      train_summary_writer: SummaryWriter,
      validation_summary_writer: SummaryWriter,
      test_summary_writer: SummaryWriter,
      output_features: LudwigFeatureDict,
      save_path: str,
  ) -> bool:
      """Runs evaluation over training, validation, and test sets.
  
      Also:
      - Prints results, saves results to the progress tracker.
      - Saves the model if the validation score is the best so far
      - If there is no validation set, the model is always saved.
  
      Returns whether the trainer should early stop, based on validation metrics history.
      """
      start_time = time.time()
      self.callback(
          lambda c: c.on_eval_start(self, progress_tracker, save_path)
      )
  
      progress_tracker.checkpoint_number += 1
      if self.is_coordinator():
          logger.info(
              f"\nRunning evaluation for step: {progress_tracker.steps}, epoch: {progress_tracker.epoch}"
          )
  
      # ================ Eval ================
      # Run a separate pass over the training data to compute metrics
      # Appends results to progress_tracker.train_metrics.
      if self.evaluate_training_set:
          self.evaluation(
              training_set,
              "train",
              progress_tracker.train_metrics,
              self.eval_batch_size,
              progress_tracker,
          )
  
      self.write_eval_summary(
          summary_writer=train_summary_writer,
          metrics=progress_tracker.train_metrics,
          step=progress_tracker.steps,
      )
  
      if validation_set is not None:
          self.callback(
              lambda c: c.on_validation_start(
                  self, progress_tracker, save_path
              )
          )
  
          # eval metrics on validation set
          self.evaluation(
              validation_set,
              VALIDATION,
              progress_tracker.validation_metrics,
              self.eval_batch_size,
              progress_tracker,
          )
  
          self.write_eval_summary(
              summary_writer=validation_summary_writer,
              metrics=progress_tracker.validation_metrics,
              step=progress_tracker.steps,
          )
  
          self.callback(
              lambda c: c.on_validation_end(
                  self, progress_tracker, save_path
              )
          )
  
      if test_set is not None:
          self.callback(
              lambda c: c.on_test_start(
                  self, progress_tracker, save_path
              )
          )
  
          # eval metrics on test set
          self.evaluation(
              test_set,
              TEST,
              progress_tracker.test_metrics,
              self.eval_batch_size,
              progress_tracker,
          )
  
          self.write_eval_summary(
              summary_writer=test_summary_writer,
              metrics=progress_tracker.test_metrics,
              step=progress_tracker.steps,
          )
  
          self.callback(
              lambda c: c.on_test_end(self, progress_tracker, save_path)
          )
  
      elapsed_time = (time.time() - start_time) * 1000.0
  
      if self.is_coordinator():
          logger.info(
              f"Evaluation took {time_utils.strdelta(elapsed_time)}\n"
          )
          print_metrics_table(
              output_features,
              progress_tracker.train_metrics,
              progress_tracker.validation_metrics,
              progress_tracker.test_metrics,
          )
  
      # Trigger eval end callback after any model weights save for complete checkpoint
      self.callback(
          lambda c: c.on_eval_end(self, progress_tracker, save_path)
      )
  
      return False
  
imports: import logging
  import os
  import time
  from typing import Callable, Dict, List, Optional, Union
  from torch.utils.tensorboard import SummaryWriter
  from ludwig.constants import MINIMUM_BATCH_SIZE, TEST, TRAINING, VALIDATION
  from ludwig.data.dataset.base import Dataset
  from ludwig.distributed.base import DistributedStrategy, LocalStrategy
  from ludwig.features.feature_utils import LudwigFeatureDict
  from ludwig.models.llm import LLM
  from ludwig.models.predictor import LlmFineTunePredictor, LlmPredictor
  from ludwig.modules.metric_modules import get_initial_validation_value
  from ludwig.schema.trainer import BaseTrainerConfig, FineTuneTrainerConfig, NoneTrainerConfig
  from ludwig.trainers.base import BaseTrainer
  from ludwig.trainers.registry import register_llm_ray_trainer, register_llm_trainer
  from ludwig.trainers.trainer import Trainer
  from ludwig.types import ModelConfigDict
  from ludwig.utils import time_utils
  from ludwig.utils.defaults import default_random_seed
  from ludwig.utils.metric_utils import TrainerMetric
  from ludwig.utils.metrics_printed_table import print_metrics_table
  from ludwig.utils.misc_utils import set_random_seed
  from ludwig.utils.torch_utils import get_torch_device
  from ludwig.utils.trainer_utils import append_metrics, get_new_progress_tracker, ProgressTracker
label_desc: Use image node_id 18 for calling the NoneTrainer obj's underlying member method code with example usage: obj.run_evaluation(training_set, validation_set, test_set, progress_tracker, train_summary_writer, validation_summary_writer, test_summary_writer, output_features, save_path) and returns: False