



"""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=snake_case__				)
class 			snake_case_						(						snake_case__				):
							__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 snake_case_  (   self			,     a_      ):
									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]			,     _A      ):
											raise ValueError(F"""Column {self.label_column} is not a ClassLabel."""      )
									a_     :      Any 						=     copy.deepcopy(self      )
									a_     :      Dict 						=     self.label_schema.copy()
									a_     :      Any 						=     features[self.label_column]
									a_     :      Optional[int] 						=     label_schema
									return task_template






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




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

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


SCREAMING_SNAKE_CASE_				= {
    """configuration_llama""": ["""LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LlamaConfig"""],
}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE_				= ["""LlamaTokenizer"""]

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE_				= ["""LlamaTokenizerFast"""]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE_				= [
					    """LlamaForCausalLM""",
					    """LlamaModel""",
					    """LlamaPreTrainedModel""",
					    """LlamaForSequenceClassification""",
					]


if TYPE_CHECKING:
					from .configuration_llama import LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP, LlamaConfig

					try:
										if not is_sentencepiece_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_llama import LlamaTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_llama_fast import LlamaTokenizerFast

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_llama import LlamaForCausalLM, LlamaForSequenceClassification, LlamaModel, LlamaPreTrainedModel


else:
					import sys

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