




'''simple docstring'''


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


_snake_case   :   Tuple     							=	logging.get_logger(__name__)

_snake_case   :   str     							=	{
    'speechbrain/m-ctc-t-large': 'https://huggingface.co/speechbrain/m-ctc-t-large/resolve/main/config.json',
    # See all M-CTC-T models at https://huggingface.co/models?filter=mctct
}

class     A					(	UpperCamelCase_					):
							lowercase_           =       'mctct'







							def __init__(						self :						List[str]							,    lowerCAmelCase_ :						Any=80_65							,    lowerCAmelCase_ :						Any=15_36							,    lowerCAmelCase_ :						Tuple=36							,    lowerCAmelCase_ :						Union[str, Any]=61_44							,    lowerCAmelCase_ :						List[str]=4							,    lowerCAmelCase_ :						Any=3_84							,    lowerCAmelCase_ :						Dict=9_20							,    lowerCAmelCase_ :						List[str]=1e-5							,    lowerCAmelCase_ :						List[Any]=0.3							,    lowerCAmelCase_ :						Any="relu"							,    lowerCAmelCase_ :						Optional[Any]=0.0_2							,    lowerCAmelCase_ :						int=0.3							,    lowerCAmelCase_ :						List[str]=0.3							,    lowerCAmelCase_ :						Optional[Any]=1							,    lowerCAmelCase_ :						Union[str, Any]=0							,    lowerCAmelCase_ :						Tuple=2							,    lowerCAmelCase_ :						Tuple=1							,    lowerCAmelCase_ :						Tuple=0.3							,    lowerCAmelCase_ :						Tuple=1							,    lowerCAmelCase_ :						Tuple=(7,)							,    lowerCAmelCase_ :						Optional[int]=(3,)							,    lowerCAmelCase_ :						Tuple=80							,    lowerCAmelCase_ :						Union[str, Any]=1							,    lowerCAmelCase_ :						List[Any]=None							,    lowerCAmelCase_ :						str="sum"							,    lowerCAmelCase_ :						str=False							,    **lowerCAmelCase_ :						Optional[Any]							,    )    ->							Dict:


														"""simple docstring"""


														super().__init__(**__a							,    pad_token_id=__a							,    bos_token_id=__a							,    eos_token_id=__a      )
														_a			  =       vocab_size
														_a			  =       hidden_size
														_a			  =       num_hidden_layers
														_a			  =       intermediate_size
														_a			  =       num_attention_heads
														_a			  =       attention_head_dim
														_a			  =       max_position_embeddings
														_a			  =       layer_norm_eps
														_a			  =       layerdrop
														_a			  =       hidden_act
														_a			  =       initializer_range
														_a			  =       hidden_dropout_prob
														_a			  =       attention_probs_dropout_prob
														_a			  =       pad_token_id
														_a			  =       bos_token_id
														_a			  =       eos_token_id
														_a			  =       conv_glu_dim
														_a			  =       conv_dropout
														_a			  =       num_conv_layers
														_a			  =       input_feat_per_channel
														_a			  =       input_channels
														_a			  =       conv_channels
														_a			  =       ctc_loss_reduction
														_a			  =       ctc_zero_infinity

														# prevents config testing fail with exporting to json
														_a			  =       list(__a      )
														_a			  =       list(__a      )

														if len(self.conv_kernel      ) != self.num_conv_layers:
																					raise ValueError(
																					    '''Configuration for convolutional module is incorrect. '''
																					    '''It is required that `len(config.conv_kernel)` == `config.num_conv_layers` '''
																					    F'but is `len(config.conv_kernel) = {len(self.conv_kernel      )}`, '
																					    F'`config.num_conv_layers = {self.num_conv_layers}`.'      )







'''simple docstring'''


import os

import pytest

from transformers.dynamic_module_utils import get_imports


_snake_case   :   List[str]     							=	'\nimport os\n'

_snake_case   :   Dict     							=	'\ndef foo():\n    import os\n    return False\n'

_snake_case   :   List[Any]     							=	'\ndef foo():\n    def bar():\n        if True:\n            import os\n        return False\n    return bar()\n'

_snake_case   :   Dict     							=	'\nimport os\n\ntry:\n    import bar\nexcept ImportError:\n    raise ValueError()\n'

_snake_case   :   Optional[Any]     							=	'\nimport os\n\ndef foo():\n    try:\n        import bar\n    except ImportError:\n        raise ValueError()\n'

_snake_case   :   Optional[Any]     							=	'\nimport os\n\ntry:\n    import bar\nexcept (ImportError, AttributeError):\n    raise ValueError()\n'

_snake_case   :   Any     							=	'\nimport os\n\ntry:\n    import bar\nexcept ImportError as e:\n    raise ValueError()\n'

_snake_case   :   List[str]     							=	'\nimport os\n\ntry:\n    import bar\nexcept:\n    raise ValueError()\n'

_snake_case   :   Dict     							=	'\nimport os\n\ntry:\n    import bar\n    import baz\nexcept ImportError:\n    raise ValueError()\n'

_snake_case   :   Any     							=	'\nimport os\n\ntry:\n    import bar\n    import baz\nexcept ImportError:\n    x = 1\n    raise ValueError()\n'

_snake_case   :   Union[str, Any]     							=	[
    TOP_LEVEL_IMPORT,
    IMPORT_IN_FUNCTION,
    DEEPLY_NESTED_IMPORT,
    TOP_LEVEL_TRY_IMPORT,
    GENERIC_EXCEPT_IMPORT,
    MULTILINE_TRY_IMPORT,
    MULTILINE_BOTH_IMPORT,
    MULTIPLE_EXCEPTS_IMPORT,
    EXCEPT_AS_IMPORT,
    TRY_IMPORT_IN_FUNCTION,
]
@pytest.mark.parametrize('''case'''				,		UpperCamelCase   )
def 	snake_case_					(UpperCamelCase :						str				,		UpperCamelCase :						List[Any]   ):





							'''simple docstring'''


							_a			  =       os.path.join(UpperCamelCase				,		'''test_file.py'''   )
							with open(UpperCamelCase				,		'''w'''   ) as _tmp_file:
														_tmp_file.write(UpperCamelCase   )

							_a			  =       get_imports(UpperCamelCase   )
							assert parsed_imports == ["os"]

