docstr: Create an empty repo in Predibase and upload trained model artifacts to that repo.
  
  Args:
      model_path (`str`):
          The path of the saved model. This is the top level directory where
          the models weights as well as other associated training artifacts
          are saved.
      repo_name (`str`):
          A repo name.
      repo_description (`str` *optional*):
          The description of the repo.
      dataset_file (`str` *optional*):
          The path to the dataset file. Required if `service` is set to
          `"predibase"` for new model repos.
      dataset_name (`str` *optional*):
          The name of the dataset. Used by the `service`
          `"predibase"`. Falls back to the filename.
docstr_tok: ["Create","an","empty","repo","in","Predibase","and","upload","trained","model","artifacts","to","that","repo",".","Args",":","model_path","(","`","str","`",")",":","The","path","of","the","saved","model",".","This","is","the","top","level","directory","where","the","models","weights","as","well","as","other","associated","training","artifacts","are","saved",".","repo_name","(","`","str","`",")",":","A","repo","name",".","repo_description","(","`","str","`","*","optional","*",")",":","The","description","of","the","repo",".","dataset_file","(","`","str","`","*","optional","*",")",":","The","path","to","the","dataset","file",".","Required","if","`","service","`","is","set","to","`","``","predibase","''","`","for","new","model","repos",".","dataset_name","(","`","str","`","*","optional","*",")",":","The","name","of","the","dataset",".","Used","by","the","`","service","`","`","``","predibase","''","`",".","Falls","back","to","the","filename","."]
code: def upload(
      self,
      repo_id: str,
      model_path: str,
      commit_description: str | None = None,
      dataset_file: str | None = None,
      dataset_name: str | None = None,
      **kwargs,
  ) -> bool:
      """Create an empty repo in Predibase and upload trained model artifacts to that repo.
  
      Args:
          model_path (`str`):
              The path of the saved model. This is the top level directory where
              the models weights as well as other associated training artifacts
              are saved.
          repo_name (`str`):
              A repo name.
          repo_description (`str` *optional*):
              The description of the repo.
          dataset_file (`str` *optional*):
              The path to the dataset file. Required if `service` is set to
              `"predibase"` for new model repos.
          dataset_name (`str` *optional*):
              The name of the dataset. Used by the `service`
              `"predibase"`. Falls back to the filename.
      """
      # Validate upload parameters are in the right format
      Predibase._validate_upload_parameters(
          repo_id,
          model_path,
          None,
          False,
          "",
          commit_description,
      )
  
      # Upload the dataset to Predibase
      try:
          dataset = self.pc.upload_dataset(
              file_path=dataset_file, name=dataset_name
          )
      except Exception as e:
          raise RuntimeError(
              "Failed to upload dataset to Predibase"
          ) from e
  
      # Create empty model repo using repo_name, but it is okay if it already exists.
      try:
          repo = self.pc.create_model_repo(
              name=repo_id,
              description=commit_description,
              exists_ok=True,
          )
      except Exception as e:
          raise RuntimeError(
              "Failed to create repo in Predibase"
          ) from e
  
      # Upload the zip file to Predibase
      try:
          self.pc.upload_model(
              repo=repo,
              model_path=model_path,
              dataset=dataset,
          )
      except Exception as e:
          raise RuntimeError(
              "Failed to upload model to Predibase"
          ) from e
  
      logger.info(
          f"Model uploaded to Predibase with repository name `{repo_id}`"
      )
      return True
  
imports: from __future__ import annotations
  import logging
  import os
  from abc import ABC, abstractmethod
  from huggingface_hub import HfApi, login
label_desc: Use image node_id 4 for calling the Predibase obj's underlying member method code with example usage: obj.upload(repo_id, model_path, commit_description, dataset_file, dataset_name) and returns: True