docstr: Uploads the transformer model and tokenizer to [huggingface's model hub](https://huggingface.co/models).
  
  The full list of parameters for PPO can be seen:
  [here](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.ModelHubMixin.push_to_hub)
  and for the remaining types of trainers,
  [here](https://huggingface.co/docs/transformers/main_classes/trainer#transformers.Trainer.push_to_hub).
  
  Args:
      repo_id:
          The name of the repository you want to push your model and tokenizer to.
          It should contain your organization name when pushing to a given organization.
  
  Raises:
      NotImplementedError: If the model doesn't exist, meaning it hasn't been instantiated yet.
docstr_tok: ["Uploads","the","transformer","model","and","tokenizer","to","[","huggingface","'s","model","hub","]","(","https",":","\/\/huggingface.co\/models",")",".","The","full","list","of","parameters","for","PPO","can","be","seen",":","[","here","]","(","https",":","\/\/huggingface.co\/docs\/huggingface_hub\/package_reference\/mixins","#","huggingface_hub.ModelHubMixin.push_to_hub",")","and","for","the","remaining","types","of","trainers",",","[","here","]","(","https",":","\/\/huggingface.co\/docs\/transformers\/main_classes\/trainer","#","transformers.Trainer.push_to_hub",")",".","Args",":","repo_id",":","The","name","of","the","repository","you","want","to","push","your","model","and","tokenizer","to",".","It","should","contain","your","organization","name","when","pushing","to","a","given","organization",".","Raises",":","NotImplementedError",":","If","the","model","does","n't","exist",",","meaning","it","has","n't","been","instantiated","yet","."]
code: def push_to_huggingface(self, repo_id: str, **kwargs) -> None:
      """Uploads the transformer model and tokenizer to [huggingface's model hub](https://huggingface.co/models).
  
      The full list of parameters for PPO can be seen:
      [here](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.ModelHubMixin.push_to_hub)
      and for the remaining types of trainers,
      [here](https://huggingface.co/docs/transformers/main_classes/trainer#transformers.Trainer.push_to_hub).
  
      Args:
          repo_id:
              The name of the repository you want to push your model and tokenizer to.
              It should contain your organization name when pushing to a given organization.
  
      Raises:
          NotImplementedError: If the model doesn't exist, meaning it hasn't been instantiated yet.
      """
      if isinstance(self._task, TrainingTaskForPPO):
          # `PPOTrainer` inherits from `trl.trainer.BaseTrainer`
          model_url = self._trainer.push_to_hub(repo_id, **kwargs)
      else:
          # The remaining models inherit from `transformers.Trainer`.
          # The `Trainer` itself generates the repo_id variable using the args
          # passed to the `TrainingArguments`. To keep a similar API we overwrite
          # the args.hub_model_id with the argument repo_id, and the repo_id
          # will be obtained from there.
          self._trainer.args.hub_model_id = repo_id
          model_url = self._trainer.model.push_to_hub(repo_id, **kwargs)
          self._trainer.tokenizer.push_to_hub(repo_id, **kwargs)
  
      self._logger.info(f"Model pushed to: {model_url}")
  
file_path: argilla/src/argilla/client/feedback/training/frameworks/trl.py
imports: import logging
  from typing import TYPE_CHECKING, Dict, List, Optional, Union
  from argilla.client.feedback.training.base import ArgillaTrainerSkeleton
  from argilla.client.feedback.training.schemas.base import TrainingTaskForDPO, TrainingTaskForPPO, TrainingTaskForRM, TrainingTaskForSFT
  from argilla.training.utils import filter_allowed_args
  from argilla.utils.dependency import require_dependencies, requires_dependencies
label_desc: Use image node_id 10 for calling the ArgillaTRLTrainer obj's underlying member method code with example usage: obj.push_to_huggingface(repo_id) without return types