code: def upload_model(
      name: str,
      path: str,
      version: str = "latest",
      progress_bar: bool = True,
  ) -> None:
      """Upload a model to the lightning cloud.
  
      Args:
          name:
              The model name.
          path:
              The path to the checkpoint to be uploaded.
          version:
              The version of the model to be uploaded. If not provided, default will be latest (not overridden).
          progress_bar:
              A progress bar to show the uploading status. Disable this if not needed, by setting to `False`.
  
      """
      client = _Client()
      user = client.auth_service_get_user()
      # TODO: Allow passing this
      project_id = _get_project(client).project_id
  
      # TODO: Post model parts if the file size is over threshold
      body = V1UploadModelRequest(
          name=f"{user.username}/{name}",
          version=version,
          project_id=project_id,
      )
      model = client.models_store_upload_model(body)
  
      _upload_file_to_url(
          model.upload_url, path, progress_bar=progress_bar
      )
  
file_path: pytorch-lightning/src/lightning/store/store.py
imports: import os
  from typing import List
  from lightning_cloud.openapi import V1Model, V1UploadModelRequest
  from lightning.app.utilities.cloud import _get_project
  from lightning.store.utils import _Client, _download_file_from_url, _upload_file_to_url
label_desc: Use image node_id 1 for calling a global function with example usage: upload_model(name, path, version, progress_bar) without return types