code: def __init__(
      self,
      checkpoint=None,
      additional_layers_to_train=3,  # this is needed otherwise the performance is usually bad
      num_classes=None,
      optimizer_name="adam",
      loss_name="cross_entropy",
      tokenizer=None,
      max_token_len=128,
      learning_rate=None,
      train_from_scratch=True,
      # Classifier args
      label_col="label",
      text_col="text",
      prediction_col="prediction",
      # TorchEstimator args
      num_proc=None,
      backend=None,
      store=None,
      metrics=None,
      loss_weights=None,
      sample_weight_col=None,
      gradient_compression=None,
      input_shapes=None,
      validation=None,
      callbacks=None,
      batch_size=None,
      val_batch_size=None,
      epochs=None,
      verbose=1,
      random_seed=None,
      shuffle_buffer_size=None,
      partitions_per_process=None,
      run_id=None,
      train_minibatch_fn=None,
      train_steps_per_epoch=None,
      validation_steps_per_epoch=None,
      transformation_fn=None,
      transformation_edit_fields=None,
      transformation_removed_fields=None,
      train_reader_num_workers=None,
      trainer_args=None,
      val_reader_num_workers=None,
      reader_pool_type=None,
      label_shapes=None,
      inmemory_cache_all=False,
      num_gpus=None,
      logger=None,
      log_every_n_steps=50,
      data_module=None,
      loader_num_epochs=None,
      terminate_on_nan=False,
      profiler=None,
      debug_data_loader=False,
      train_async_data_loader_queue_size=None,
      val_async_data_loader_queue_size=None,
      use_gpu=True,
      mp_start_method=None,
  ):
      super(DeepTextClassifier, self).__init__()
  
      self._setDefault(
          checkpoint=None,
          additional_layers_to_train=3,
          num_classes=None,
          optimizer_name="adam",
          loss_name="cross_entropy",
          tokenizer=None,
          max_token_len=128,
          learning_rate=None,
          train_from_scratch=True,
          feature_cols=["text"],
          label_cols=["label"],
          label_col="label",
          text_col="text",
          prediction_col="prediction",
      )
  
      kwargs = self._kwargs
      self._set(**kwargs)
  
      self._update_cols()
      self._update_transformation_fn()
  
      model = LitDeepTextModel(
          checkpoint=self.getCheckpoint(),
          additional_layers_to_train=self.getAdditionalLayersToTrain(),
          num_labels=self.getNumClasses(),
          optimizer_name=self.getOptimizerName(),
          loss_name=self.getLossName(),
          label_col=self.getLabelCol(),
          text_col=self.getTextCol(),
          learning_rate=self.getLearningRate(),
          train_from_scratch=self.getTrainFromScratch(),
      )
      self._set(model=model)
  
imports: from horovod.spark.lightning import TorchEstimator
  import torch
  from pyspark.ml.param.shared import Param, Params
  from pytorch_lightning.utilities import _module_available
  from synapse.ml.dl.DeepTextModel import DeepTextModel
  from synapse.ml.dl.LitDeepTextModel import LitDeepTextModel
  from synapse.ml.dl.utils import keywords_catch, get_or_create_backend
  from synapse.ml.dl.PredictionParams import TextPredictionParams
label_desc: Use image node_id 1 to create a new DeepTextClassifier object from inherited base classes: TorchEstimator, TextPredictionParams with example: obj = DeepTextClassifier(checkpoint, additional_layers_to_train, num_classes, optimizer_name, loss_name, tokenizer, max_token_len, learning_rate, train_from_scratch, label_col, text_col, prediction_col, num_proc, backend, store, metrics, loss_weights, sample_weight_col, gradient_compression, input_shapes, validation, callbacks, batch_size, val_batch_size, epochs, verbose, random_seed, shuffle_buffer_size, partitions_per_process, run_id, train_minibatch_fn, train_steps_per_epoch, validation_steps_per_epoch, transformation_fn, transformation_edit_fields, transformation_removed_fields, train_reader_num_workers, trainer_args, val_reader_num_workers, reader_pool_type, label_shapes, inmemory_cache_all, num_gpus, logger, log_every_n_steps, data_module, loader_num_epochs, terminate_on_nan, profiler, debug_data_loader, train_async_data_loader_queue_size, val_async_data_loader_queue_size, use_gpu, mp_start_method)