code: def init_pipeline(self):
      import transformers
      from transformers import AutoModelForQuestionAnswering, pipeline
  
      if self.device == "cuda":
          device = 0
      else:
          device = -1
  
      if self._record_class == TextClassificationRecord:
          if transformers.__version__ >= "4.20.0":
              kwargs = {"top_k": None}
          else:
              kwargs = {"return_all_scores": True}
          self.trainer_pipeline = pipeline(
              task="text-classification",
              model=self.trainer_model,
              tokenizer=self.trainer_tokenizer,
              device=device,
              **kwargs,
          )
      elif self._record_class == TokenClassificationRecord:
          self.trainer_pipeline = pipeline(
              task="token-classification",
              model=self.trainer_model,
              tokenizer=self.trainer_tokenizer,
              aggregation_strategy="first",
              device=device,
          )
      elif self._model_class == AutoModelForQuestionAnswering:
          self.trainer_pipeline = pipeline(
              task="question-answering",
              model=self.trainer_model,
              tokenizer=self.trainer_tokenizer,
              device=device,
          )
      else:
          raise NotImplementedError(
              f"{self._record_class} is not supported yet."
          )
  
file_path: argilla/src/argilla/training/transformers.py
imports: import logging
  from typing import List, Union
  from datasets import DatasetDict
  from argilla.client.models import TextClassificationRecord, TokenClassificationRecord
  from argilla.training.base import ArgillaTrainerSkeleton
  from argilla.training.utils import _apply_column_mapping, filter_allowed_args, get_default_args
  from argilla.utils.dependency import require_dependencies
label_desc: Use image node_id 4 for calling the ArgillaTransformersTrainer obj's underlying member method code with example usage: obj.init_pipeline() without return types