






'''simple docstring'''


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


lowerCamelCase_				: Union[str, Any]    	=							logging.get_logger(__name__)

lowerCamelCase_				: Tuple    	=							{
    '''google/pegasus-large''': '''https://huggingface.co/google/pegasus-large/resolve/main/config.json''',
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}
class    _SCREAMING_SNAKE_CASE							(		__lowerCamelCase	):


			'''simple docstring'''





			__a							:							Optional[int]					     =					"pegasus"
			__a							:							str					     =					["past_key_values"]
			__a							:							Tuple					     =					{"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}






			def __init__(   self							:						int ,      lowercase							:						Optional[int]=5_0_2_6_5 ,      lowercase							:						Optional[Any]=1_0_2_4 ,      lowercase							:						int=1_2 ,      lowercase							:						Optional[int]=4_0_9_6 ,      lowercase							:						Tuple=1_6 ,      lowercase							:						Optional[int]=1_2 ,      lowercase							:						Dict=4_0_9_6 ,      lowercase							:						Optional[Any]=1_6 ,      lowercase							:						Tuple=0.0 ,      lowercase							:						List[str]=0.0 ,      lowercase							:						Optional[int]=True ,      lowercase							:						Union[str, Any]=True ,      lowercase							:						List[Any]="gelu" ,      lowercase							:						Any=1_0_2_4 ,      lowercase							:						Optional[int]=0.1 ,      lowercase							:						Union[str, Any]=0.0 ,      lowercase							:						List[Any]=0.0 ,      lowercase							:						Tuple=0.0_2 ,      lowercase							:						List[str]=0 ,      lowercase							:						str=False ,      lowercase							:						int=0 ,      lowercase							:						Optional[int]=1 ,      lowercase							:						Union[str, Any]=1 ,      **lowercase							:						List[str] ,      )							->    Dict:

									'''simple docstring'''







									UpperCamelCase__         = vocab_size
									UpperCamelCase__         = max_position_embeddings
									UpperCamelCase__         = d_model
									UpperCamelCase__         = encoder_ffn_dim
									UpperCamelCase__         = encoder_layers
									UpperCamelCase__         = encoder_attention_heads
									UpperCamelCase__         = decoder_ffn_dim
									UpperCamelCase__         = decoder_layers
									UpperCamelCase__         = decoder_attention_heads
									UpperCamelCase__         = dropout
									UpperCamelCase__         = attention_dropout
									UpperCamelCase__         = activation_dropout
									UpperCamelCase__         = activation_function
									UpperCamelCase__         = init_std
									UpperCamelCase__         = encoder_layerdrop
									UpperCamelCase__         = decoder_layerdrop
									UpperCamelCase__         = use_cache
									UpperCamelCase__         = encoder_layers
									UpperCamelCase__         = scale_embedding  # scale factor will be sqrt(d_model) if True
									super().__init__(
									    pad_token_id=UpperCAmelCase_ ,      eos_token_id=UpperCAmelCase_ ,      is_encoder_decoder=UpperCAmelCase_ ,      decoder_start_token_id=UpperCAmelCase_ ,      forced_eos_token_id=UpperCAmelCase_ ,      **UpperCAmelCase_ ,      )






			@property
			def 				A      (   self							:						Dict			)							->    Any:

									'''simple docstring'''







									return self.encoder_attention_heads







			@property
			def 				A      (   self							:						List[Any]			)							->    str:

									'''simple docstring'''







									return self.d_model














'''simple docstring'''


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

from ..features import Audio, ClassLabel, Features
from .base import TaskTemplate
@dataclass(frozen=SCREAMING_SNAKE_CASE	)
class    _SCREAMING_SNAKE_CASE							(		SCREAMING_SNAKE_CASE	):


			'''simple docstring'''





			__a							:							str					     =					field(default="audio-classification"       ,metadata={"include_in_asdict_even_if_is_default": True}	)
			__a							:							ClassVar[Features]					     =					Features({"audio": Audio()}	)
			__a							:							ClassVar[Features]					     =					Features({"labels": ClassLabel}	)
			__a							:							str					     =					"audio"
			__a							:							str					     =					"labels"






			def 				A      (   self							:						List[Any] ,      lowercase							:						List[Any]			)							->    Any:

									'''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] ,      lowercase			):
															raise ValueError(f"Column {self.label_column} is not a ClassLabel."			)
									UpperCamelCase__         = copy.deepcopy(self			)
									UpperCamelCase__         = self.label_schema.copy()
									UpperCamelCase__         = features[self.label_column]
									UpperCamelCase__         = label_schema
									return task_template







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

									'''simple docstring'''







									return {
									    self.audio_column: "audio",
									    self.label_column: "labels",
									}
