code: def predict_cli(
      model_path: str,
      dataset: Union[str, dict, pd.DataFrame] = None,
      data_format: str = None,
      split: str = FULL,
      batch_size: int = 128,
      generation_config: Optional[str] = None,
      skip_save_unprocessed_output: bool = False,
      skip_save_predictions: bool = False,
      output_directory: str = "results",
      gpus: Union[str, int, List[int]] = None,
      gpu_memory_limit: Optional[float] = None,
      allow_parallel_threads: bool = True,
      callbacks: List[Callback] = None,
      backend: Union[Backend, str] = None,
      logging_level: int = logging.INFO,
      **kwargs,
  ) -> None:
      """Loads pre-trained model to make predictions on the provided data set.
  
      # Inputs
  
      :param model_path: (str) filepath to pre-trained model.
      :param dataset: (Union[str, dict, pandas.DataFrame], default: `None`)
          source containing the entire dataset to be used in the prediction.
      :param data_format: (str, default: `None`) format to interpret data
          sources. Will be inferred automatically if not specified.  Valid
          formats are `'auto'`, `'csv'`, `'excel'`, `'feather'`,
          `'fwf'`, `'hdf5'` (cache file produced during previous training),
          `'html'` (file containing a single HTML `<table>`), `'json'`, `'jsonl'`,
          `'parquet'`, `'pickle'` (pickled Pandas DataFrame), `'sas'`, `'spss'`,
          `'stata'`, `'tsv'`.
      :param split: (str, default: `full`) split on which
          to perform predictions. Valid values are `'training'`, `'validation'`,
          `'test'` and `'full'`.
      :param batch_size: (int, default `128`) size of batches for processing.
      :param generation_config: (str, default: `None`) a string representing
          the parameters for generation required to perform predictions with
          an LLM. The string must be a JSON formatted dictionary with keys from
          https://huggingface.co/docs/transformers/main_classes/text_generation#transformers.GenerationConfig
          These will be merged with the generation parameters from the original
          model config.
      :param skip_save_unprocessed_output: (bool, default: `False`) by default
          predictions and their probabilities are saved in both raw
          unprocessed numpy files containing tensors and as postprocessed
          CSV files (one for each output feature). If this parameter is True,
          only the CSV ones are saved and the numpy ones are skipped.
      :param skip_save_predictions: (bool, default: `False`) skips saving test
          predictions CSV files
      :param output_directory: (str, default: `'results'`) the directory that
          will contain the training statistics, TensorBoard logs, the saved
          model and the training progress files.
      :param gpus: (list, default: `None`) list of GPUs that are available
          for training.
      :param gpu_memory_limit: (float: default: `None`) maximum memory fraction
          [0, 1] allowed to allocate per GPU device.
      :param allow_parallel_threads: (bool, default: `True`) allow PyTorch
          to use multithreading parallelism to improve performance at
          the cost of determinism.
      :param callbacks: (list, default: `None`) a list of
          `ludwig.callbacks.Callback` objects that provide hooks into the
          Ludwig pipeline.
      :param backend: (Union[Backend, str]) `Backend` or string name
          of backend to use to execute preprocessing / training steps.
      :param logging_level: (int) Log level that will be sent to stderr.
  
      # Returns
  
      :return: ('None')
      """
      model = LudwigModel.load(
          model_path,
          logging_level=logging_level,
          backend=backend,
          gpus=gpus,
          gpu_memory_limit=gpu_memory_limit,
          allow_parallel_threads=allow_parallel_threads,
          callbacks=callbacks,
      )
      model.predict(
          dataset=dataset,
          data_format=data_format,
          split=split,
          batch_size=batch_size,
          generation_config=literal_eval(generation_config)
          if generation_config
          else None,
          skip_save_unprocessed_output=skip_save_unprocessed_output,
          skip_save_predictions=skip_save_predictions,
          output_directory=output_directory,
          return_type="dict",
      )
  
file_path: ludwig/ludwig/predict.py
imports: import argparse
  import logging
  import sys
  from ast import literal_eval
  from typing import List, Optional, Union
  import pandas
  from ludwig.api import LudwigModel
  from ludwig.backend import ALL_BACKENDS, Backend, initialize_backend
  from ludwig.callbacks import Callback
  from ludwig.constants import FULL, TEST, TRAINING, VALIDATION
  from ludwig.contrib import add_contrib_callback_args
  from ludwig.globals import LUDWIG_VERSION
  from ludwig.utils.print_utils import get_logging_level_registry, print_ludwig
label_desc: Use image node_id 1 for calling a global function with example usage: predict_cli(model_path, dataset, data_format, split, batch_size, generation_config, skip_save_unprocessed_output, skip_save_predictions, output_directory, gpus, gpu_memory_limit, allow_parallel_threads, callbacks, backend, logging_level) without return types