from ...configuration_utils import PretrainedConfig
from ...utils import logging


A_:   Tuple   =      logging.get_logger(__name__)

A_:   str   =      {
    '''facebook/timesformer''': '''https://huggingface.co/facebook/timesformer/resolve/main/config.json''',
}


class _lowercase       (							lowerCAmelCase__    ):





							"""simple docstring"""




							lowerCAmelCase__							=       'timesformer'



							def __init__(     self  , UpperCAmelCase=224  , UpperCAmelCase=16  , UpperCAmelCase=3  , UpperCAmelCase=8  , UpperCAmelCase=768  , UpperCAmelCase=12  , UpperCAmelCase=12  , UpperCAmelCase=3072  , UpperCAmelCase="gelu"  , UpperCAmelCase=0.0  , UpperCAmelCase=0.0  , UpperCAmelCase=0.02  , UpperCAmelCase=1e-6  , UpperCAmelCase=True  , UpperCAmelCase="divided_space_time"  , UpperCAmelCase=0  , **UpperCAmelCase  , ):







														'''simple docstring'''






														super().__init__(**snake_case_	)

														_lowercase					=						image_size
														_lowercase					=						patch_size
														_lowercase					=						num_channels
														_lowercase					=						num_frames

														_lowercase					=						hidden_size
														_lowercase					=						num_hidden_layers
														_lowercase					=						num_attention_heads
														_lowercase					=						intermediate_size
														_lowercase					=						hidden_act
														_lowercase					=						hidden_dropout_prob
														_lowercase					=						attention_probs_dropout_prob
														_lowercase					=						initializer_range
														_lowercase					=						layer_norm_eps
														_lowercase					=						qkv_bias

														_lowercase					=						attention_type
														_lowercase					=						drop_path_rate






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

from ..features import Audio, Features, Value
from .base import TaskTemplate
@dataclass(frozen=lowerCAmelCase__					)
class 						lowerCamelCase_							(					lowerCAmelCase__					):



					'''simple docstring'''







					__UpperCAmelCase							  =					field(default="automatic-speech-recognition"  ,  metadata={"include_in_asdict_even_if_is_default": True}					)
					__UpperCAmelCase							  =					Features({"audio": Audio()}					)
					__UpperCAmelCase							  =					Features({"transcription": Value("string"					)}					)
					__UpperCAmelCase							  =					"audio"
					__UpperCAmelCase							  =					"transcription"






					def A   (					self			,							snake_case_    ) ->      Any:







								'''simple docstring'''

								if self.audio_column not in features:
											raise ValueError(F'Column {self.audio_column} is not present in features.'    )
								if not isinstance(features[self.audio_column]			,							snake_case_    ):
											raise ValueError(F'Column {self.audio_column} is not an Audio type.'    )
								__lowercase			       = copy.deepcopy(self    )
								__lowercase			       = self.input_schema.copy()
								__lowercase			       = features[self.audio_column]
								__lowercase			       = input_schema
								return task_template






					@property
					def A   (					self    ) ->      Dict[str, str]:







								'''simple docstring'''

								return {self.audio_column: "audio", self.transcription_column: "transcription"}


