class_docstr: The ``TextEmbedder`` is a :class:`~flash.Task` for generating sentence embeddings, training and validation. For
  more details, see `embeddings`.
  
  You can change the backbone to any question answering model from `UKPLab/sentence-transformers
  <https://github.com/UKPLab/sentence-transformers>`_ using the ``backbone``
  argument.
  
  Args:
      backbone: backbone model to use for the task.
      enable_ort: Enable Torch ONNX Runtime Optimization: https://onnxruntime.ai/docs/#onnx-runtime-for-training
code: def __init__(
      self,
      backbone: str = "sentence-transformers/all-MiniLM-L6-v2",
      max_length: int = 128,
      tokenizer_backbone: Optional[str] = None,
      tokenizer_kwargs: Optional[Dict[str, Any]] = None,
      enable_ort: bool = False,
  ):
      os.environ["TOKENIZERS_PARALLELISM"] = "TRUE"
      # disable HF thousand warnings
      warnings.simplefilter("ignore")
      # set os environ variable for multiprocesses
      os.environ["PYTHONWARNINGS"] = "ignore"
      super().__init__()
  
      if tokenizer_backbone is None:
          tokenizer_backbone = backbone
      self.max_length = max_length
      self.collate_fn = TextClassificationCollate(
          backbone=tokenizer_backbone,
          max_length=max_length,
          tokenizer_kwargs=tokenizer_kwargs,
      )
      self.model = self.backbones.get(backbone)()
      self.pooling = Pooling(self.model.config.hidden_size)
      self.enable_ort = enable_ort
  
imports: import logging
  import os
  import warnings
  from typing import Any, Dict, List, Optional
  import torch
  from pytorch_lightning import Callback
  from torch import Tensor
  from flash.core.model import Task
  from flash.core.registry import FlashRegistry, print_provider_info
  from flash.core.utilities.imports import _TOPIC_TEXT_AVAILABLE
  from flash.core.utilities.providers import _SENTENCE_TRANSFORMERS
  from flash.text.classification.collate import TextClassificationCollate
  from flash.text.embedding.backbones import HUGGINGFACE_BACKBONES
  from flash.text.ort_callback import ORTCallback
label_desc: Use image node_id 1 to create a new TextEmbedder object from inherited base classes: Task with example: obj = TextEmbedder(backbone, max_length, tokenizer_backbone, tokenizer_kwargs, enable_ort)