docstr: This method is used to generate the `spacy` configuration file, which is used to train
docstr_tok: ["This","method","is","used","to","generate","the","`","spacy","`","configuration","file",",","which","is","used","to","train"]
code: def init_training_args(self) -> None:
      """
      This method is used to generate the `spacy` configuration file, which is used to train
      """
      from spacy.cli.init_config import init_config
  
      # We generate the config with GPU just when we are using `spacy-transformers`,
      # otherwise the default configuration will be messed up for `spacy`.
      self.trainer_kwargs = init_config(
          lang=self.language,
          pipeline=self._spacy_pipeline_components,
          optimize=self.optimize,
          gpu=False,
      )
  
      self.trainer_kwargs["paths"]["train"] = self._train_dataset_path
      self.trainer_kwargs["paths"]["dev"] = self._eval_dataset_path
      self.trainer_kwargs["system"]["seed"] = self._seed or 42
  
      # Now we can already set the GPU properties if we want to train/fine-tune a
      # `spacy` model using the GPU, or a `spacy-transformers` model using the CPU.
      self.trainer_kwargs["system"]["gpu_allocator"] = (
          (
              "pytorch"
              if self.has_torch
              else "tensorflow"
              if self.has_tensorflow
              else None
          )
          if self.use_gpu
          else None
      )
      self.trainer_kwargs["nlp"]["batch_size"] = (
          128 if self.use_gpu else 1000
      )
  
      if "tok2vec" in self.trainer_kwargs["nlp"]["pipeline"]:
          # If we want to fine-tune the `tok2vec` component, then we need to set the
          # `init_tok2vec` path to the model we want to fine-tune.
          if self.freeze_tok2vec is False:
              self.trainer_kwargs["paths"]["init_tok2vec"] = self._model
          else:
              # Otherwise, if we don't want to fine-tune the `tok2vec` component, then we
              # need to set the `frozen_components` and `annotating_components` to
              # `["tok2vec"]`.
              self.trainer_kwargs["training"]["frozen_components"] = [
                  "tok2vec"
              ]
              self.trainer_kwargs["training"][
                  "annotating_components"
              ] = ["tok2vec"]
  
imports: import logging
  import sys
  from pathlib import Path
  from typing import Any, Dict, List, Literal, Optional, Union
  from pydantic import BaseModel
  from argilla.client.models import TextClassificationRecord, TokenClassificationRecord
  from argilla.training.base import ArgillaTrainerSkeleton
  from argilla.utils.dependency import require_dependencies
label_desc: Use image node_id 2 for calling the ArgillaSpaCyTrainer obj's underlying member method code with example usage: obj.init_training_args() without return types