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","."]
code: def tune_batch_size(
      self,
      config: ModelConfigDict,
      training_set: Dataset,
      random_seed: int = default_random_seed,
      max_trials: int = 20,
      halving_limit: int = 3,
      snapshot_weights: bool = True,
      on_best_batch_size_updated: Optional[
          Callable[[int, float, int], None]
      ] = None,
      tune_for_training: bool = True,
  ) -> int:
      # TODO: Implement batch size tuning for LLM, currently just returns the default batch size
      # Compared to ECD, this just requires forward passes till we OOM.
      # https://github.com/ludwig-ai/ludwig/issues/3525
      return MINIMUM_BATCH_SIZE
  
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 5 for calling the NoneTrainer obj's underlying member method code with example usage: obj.tune_batch_size(config, training_set, random_seed, max_trials, halving_limit, snapshot_weights, on_best_batch_size_updated, tune_for_training) and returns: MINIMUM_BATCH_SIZE