




"""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=lowercase						)
class lowerCAmelCase__	(     lowercase						):






			'''simple docstring'''



			lowerCamelCase__      =			field(default="""text-classification""",	metadata={"""include_in_asdict_even_if_is_default""": True}						)
			lowerCamelCase__      =			Features({"""text""": Value("""string"""						)}						)
			lowerCamelCase__      =			Features({"""labels""": ClassLabel}						)
			lowerCamelCase__      =			"text"
			lowerCamelCase__      =			"labels"
			def 					A_    (  self  ,      lowercase  ):
							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]  ,      lowercase  ):
											raise ValueError(F'''Column {self.label_column} is not a ClassLabel.'''  )
							_lowerCamelCase     :			Optional[Any]    =    copy.deepcopy(self  )
							_lowerCamelCase     :			List[str]    =    self.label_schema.copy()
							_lowerCamelCase     :			Optional[int]    =    features[self.label_column]
							_lowerCamelCase     :			Optional[int]    =    label_schema
							return task_template






			@property
			def 					A_    (  self  ):
							return {
							    self.text_column: "text",
							    self.label_column: "labels",
							}





"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase__     						=						{"""configuration_ibert""": ["""IBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """IBertConfig""", """IBertOnnxConfig"""]}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowercase__     						=						[
			    """IBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
			    """IBertForMaskedLM""",
			    """IBertForMultipleChoice""",
			    """IBertForQuestionAnswering""",
			    """IBertForSequenceClassification""",
			    """IBertForTokenClassification""",
			    """IBertModel""",
			    """IBertPreTrainedModel""",
			]

if TYPE_CHECKING:
			from .configuration_ibert import IBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, IBertConfig, IBertOnnxConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_ibert import (
						    IBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
						    IBertForMaskedLM,
						    IBertForMultipleChoice,
						    IBertForQuestionAnswering,
						    IBertForSequenceClassification,
						    IBertForTokenClassification,
						    IBertModel,
						    IBertPreTrainedModel,
						)

else:
			import sys

			lowercase__     						=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)