code: def cli(sys_argv):
      parser = argparse.ArgumentParser(
          description="This script pushes a trained model to a hosted model repository service",
          prog="ludwig upload",
          usage="%(prog)s [options]",
      )
  
      # ---------------
      # Required parameters
      # ---------------
      parser.add_argument(
          "service",
          help="Name of the model repository service.",
          default="hf_hub",
          choices=["hf_hub", "predibase"],
      )
  
      parser.add_argument(
          "-r",
          "--repo_id",
          help="Name of the repo. This will be created if it doesn't exist. Format: username/repo_name",
          required=True,
      )
  
      parser.add_argument(
          "-m",
          "--model_path",
          help="Path of the trained model on disk",
          required=True,
      )
  
      # ---------------
      # Optional parameters
      # ---------------
      parser.add_argument(
          "-p",
          "--private",
          help="Make the repo private",
          default=False,
          choices=[True, False],
      )
  
      parser.add_argument(
          "-t",
          "--repo_type",
          help="Type of repo",
          default="model",
          choices=["model", "space", "dataset"],
      )
  
      parser.add_argument(
          "-c",
          "--commit_message",
          help="The summary / title / first line of the generated commit.",
          default="Upload trained [Ludwig](https://ludwig.ai/latest/) model weights",
      )
  
      parser.add_argument(
          "-d",
          "--commit_description",
          help="The description of the generated commit",
          default=None,
      )
  
      parser.add_argument(
          "-l",
          "--logging_level",
          default="info",
          help="The level of logging to use",
          choices=[
              "critical",
              "error",
              "warning",
              "info",
              "debug",
              "notset",
          ],
      )
  
      parser.add_argument(
          "-df",
          "--dataset_file",
          help="The location of the dataset file",
          default=None,
      )
      parser.add_argument(
          "-dn",
          "--dataset_name",
          help="(Optional) The name of the dataset in the Provider",
          default=None,
      )
  
      args = parser.parse_args(sys_argv)
  
      args.logging_level = get_logging_level_registry()[
          args.logging_level
      ]
      logging.getLogger("ludwig").setLevel(args.logging_level)
      global logger
      logger = logging.getLogger("ludwig.upload")
  
      upload_cli(**vars(args))
  
file_path: ludwig/ludwig/upload.py
imports: import argparse
  import logging
  import sys
  from typing import Optional
  from ludwig.utils.print_utils import get_logging_level_registry
  from ludwig.utils.upload_utils import HuggingFaceHub, Predibase
label_desc: Use image node_id 3 for calling a global function with example usage: cli(sys_argv) without return types