


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case							:       List[Any]     			=      {
    '''configuration_xlm_roberta_xl''': [
        '''XLM_ROBERTA_XL_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''XLMRobertaXLConfig''',
        '''XLMRobertaXLOnnxConfig''',
    ],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							:       Optional[Any]     			=      [
						    '''XLM_ROBERTA_XL_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''XLMRobertaXLForCausalLM''',
						    '''XLMRobertaXLForMaskedLM''',
						    '''XLMRobertaXLForMultipleChoice''',
						    '''XLMRobertaXLForQuestionAnswering''',
						    '''XLMRobertaXLForSequenceClassification''',
						    '''XLMRobertaXLForTokenClassification''',
						    '''XLMRobertaXLModel''',
						    '''XLMRobertaXLPreTrainedModel''',
						]

if TYPE_CHECKING:
						from .configuration_xlm_roberta_xl import (
						    XLM_ROBERTA_XL_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    XLMRobertaXLConfig,
						    XLMRobertaXLOnnxConfig,
						)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_xlm_roberta_xl import (
												    XLM_ROBERTA_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
												    XLMRobertaXLForCausalLM,
												    XLMRobertaXLForMaskedLM,
												    XLMRobertaXLForMultipleChoice,
												    XLMRobertaXLForQuestionAnswering,
												    XLMRobertaXLForSequenceClassification,
												    XLMRobertaXLForTokenClassification,
												    XLMRobertaXLModel,
												    XLMRobertaXLPreTrainedModel,
												)

else:
						import sys

						snake_case							:       Optional[int]     			=      _LazyModule(__name__, globals()['''__file__'''], _import_structure)








import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

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







@dataclass(frozen=lowerCamelCase_      )
class        snake_case_   (lowerCamelCase_      ):
					UpperCAmelCase__					:    str          =			field(default='''audio-classification'''	,						metadata={'''include_in_asdict_even_if_is_default''': True}      )
					UpperCAmelCase__					:    ClassVar[Features]          =			Features({'''audio''': Audio()}      )
					UpperCAmelCase__					:    ClassVar[Features]          =			Features({'''labels''': ClassLabel}      )
					UpperCAmelCase__					:    str          =			"audio"
					UpperCAmelCase__					:    str          =			"labels"
					def  lowerCamelCase__(      self   :Optional[int]			,__snake_case   :int      )					->    str:
												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]			,__snake_case      ):
																			raise ValueError(F'Column {self.label_column} is not a ClassLabel.'      )
												a__             =     copy.deepcopy(self      )
												a__             =     self.label_schema.copy()
												a__             =     features[self.label_column]
												a__             =     label_schema
												return task_template



					@property
					def  lowerCamelCase__(      self   :Dict      )					->    Dict[str, str]:
												return {
												    self.audio_column: "audio",
												    self.label_column: "labels",
												}




