code: def __init__(
      self,
      model_type: str,
      model_name: str,
      model_class: AutoModel,
      load_path="",
      use_auth_token: Union[str, bool] = None,
      trust_remote_code: bool = False,
  ):
      self.logger = self._get_logger()
      self.model_type = model_type
      self.model_name = model_name
  
      # Sets self.model and self.tokenizer if load_model is True
      if load_path != "":
          self.logger.warning(
              f"load_path has been deprecated. Provide the load_path to the  model_name parameter instead {self.model_name}. load_path will be removed in a later version. For now, we'll load the model form the load_path provided.  "
          )
          self.model_name = load_path
  
      (
          self.config,
          self.tokenizer,
          self.model,
      ) = self._get_model_components(
          self.model_name,
          use_auth_token,
          trust_remote_code,
          model_class,
      )
  
      self.device = self.__get_device()
  
      self.logger.info("Using device: %s", self.device)
  
      if (
          self.tokenizer.pad_token is None
          and self.tokenizer.eos_token is not None
      ):
          self.tokenizer.pad_token = self.tokenizer.eos_token
  
      self.model.resize_token_embeddings(len(self.tokenizer))
  
      # Set within the child classes.
      self._data_collator = None
      self._t_data_file_type = None
      self._type = None
      self._pipeline_class = None
  
      # Loaded in upon first time calling text generation.
      self._pipeline = None
  
      self._on_device = False
  
imports: import logging
  import os
  import tempfile
  from typing import Union
  from datasets import Dataset, DatasetDict, load_dataset, load_from_disk
  import torch
  from transformers import AutoConfig, AutoModel, AutoTokenizer, Seq2SeqTrainer, Seq2SeqTrainingArguments, Trainer, TrainingArguments
  from happytransformer.args import EvalArgs, TrainArgs
  from happytransformer.fine_tuning_util import EvalResult, FistStep, ZERO_2_SETTINGS, ZERO_3_SETTINGS
label_desc: Use image node_id 1 to create a new HappyTransformer object  with example: obj = HappyTransformer(model_type, model_name, model_class, load_path, use_auth_token, trust_remote_code)