

'''simple docstring'''
import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import ClassLabel, Features, Value
from .base import TaskTemplate


@dataclass(frozen=UpperCAmelCase__  )
class    a__  (							UpperCAmelCase__  ):
   # `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
   _SCREAMING_SNAKE_CASE    :     str	       =							field(default='text-classification'  ,      metadata={'include_in_asdict_even_if_is_default': True}  )
   _SCREAMING_SNAKE_CASE    :     ClassVar[Features]	       =							Features({'text': Value('string'  )}  )
   _SCREAMING_SNAKE_CASE    :     ClassVar[Features]	       =							Features({'labels': ClassLabel}  )
   _SCREAMING_SNAKE_CASE    :     str	       =							"text"
   _SCREAMING_SNAKE_CASE    :     str	       =							"labels"


   def 						_lowerCamelCase   ( self			,				_UpperCamelCase  ):





      """simple docstring"""





      if self.label_column not in features:
         raise ValueError(f'''Column {self.label_column} is not present in features.'''  )
      if not isinstance(features[self.label_column]			,				_SCREAMING_SNAKE_CASE  ):
         raise ValueError(f'''Column {self.label_column} is not a ClassLabel.'''  )
      _lowercase			:      Any			     =   copy.deepcopy(self  )
      _lowercase			:      int			     =   self.label_schema.copy()
      _lowercase			:      Optional[Any]			     =   features[self.label_column]
      _lowercase			:      Optional[int]			     =   label_schema
      return task_template






   @property
   def 						_lowerCamelCase   ( self  ):





      """simple docstring"""





      return {
          self.text_column: "text",
          self.label_column: "labels",
      }











"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


A:   str								=		{
    "configuration_distilbert": [
        "DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "DistilBertConfig",
        "DistilBertOnnxConfig",
    ],
    "tokenization_distilbert": ["DistilBertTokenizer"],
}

try:
      if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:   Dict								=		["DistilBertTokenizerFast"]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:   List[Any]								=		[
          "DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
          "DistilBertForMaskedLM",
          "DistilBertForMultipleChoice",
          "DistilBertForQuestionAnswering",
          "DistilBertForSequenceClassification",
          "DistilBertForTokenClassification",
          "DistilBertModel",
          "DistilBertPreTrainedModel",
      ]

try:
      if not is_tf_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:   Dict								=		[
          "TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
          "TFDistilBertForMaskedLM",
          "TFDistilBertForMultipleChoice",
          "TFDistilBertForQuestionAnswering",
          "TFDistilBertForSequenceClassification",
          "TFDistilBertForTokenClassification",
          "TFDistilBertMainLayer",
          "TFDistilBertModel",
          "TFDistilBertPreTrainedModel",
      ]

try:
      if not is_flax_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:   int								=		[
          "FlaxDistilBertForMaskedLM",
          "FlaxDistilBertForMultipleChoice",
          "FlaxDistilBertForQuestionAnswering",
          "FlaxDistilBertForSequenceClassification",
          "FlaxDistilBertForTokenClassification",
          "FlaxDistilBertModel",
          "FlaxDistilBertPreTrainedModel",
      ]


if TYPE_CHECKING:
      from .configuration_distilbert import (
          DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP,
          DistilBertConfig,
          DistilBertOnnxConfig,
      )
      from .tokenization_distilbert import DistilBertTokenizer

      try:
            if not is_tokenizers_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_distilbert_fast import DistilBertTokenizerFast

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_distilbert import (
                DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                DistilBertForMaskedLM,
                DistilBertForMultipleChoice,
                DistilBertForQuestionAnswering,
                DistilBertForSequenceClassification,
                DistilBertForTokenClassification,
                DistilBertModel,
                DistilBertPreTrainedModel,
            )

      try:
            if not is_tf_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tf_distilbert import (
                TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                TFDistilBertForMaskedLM,
                TFDistilBertForMultipleChoice,
                TFDistilBertForQuestionAnswering,
                TFDistilBertForSequenceClassification,
                TFDistilBertForTokenClassification,
                TFDistilBertMainLayer,
                TFDistilBertModel,
                TFDistilBertPreTrainedModel,
            )

      try:
            if not is_flax_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_flax_distilbert import (
                FlaxDistilBertForMaskedLM,
                FlaxDistilBertForMultipleChoice,
                FlaxDistilBertForQuestionAnswering,
                FlaxDistilBertForSequenceClassification,
                FlaxDistilBertForTokenClassification,
                FlaxDistilBertModel,
                FlaxDistilBertPreTrainedModel,
            )

else:
      import sys

      A:   Optional[int]								=		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
