




import argparse
import json
import os
import sys
import tempfile
import unittest
from argparse import Namespace
from dataclasses import dataclass, field
from enum import Enum
from pathlib import Path
from typing import List, Literal, Optional

import yaml

from transformers import HfArgumentParser, TrainingArguments
from transformers.hf_argparser import make_choice_type_function, string_to_bool


# Since Python 3.10, we can use the builtin `|` operator for Union types
# See PEP 604: https://peps.python.org/pep-0604
_A				     =						sys.version_info >= (3, 10)
def     lowerCAmelCase_							(						__a=None						,						__a=None			)							->      Any:





							"""simple docstring"""





							return field(default_factory=lambda: default						,						metadata=_lowercase			)


@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     42
				lowerCamelCase__          =     42
				lowerCamelCase__          =     42
				lowerCamelCase__          =     42







@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     42
				lowerCamelCase__          =     field(default='toto'	, metadata={'help': 'help message'}						)







@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     False
				lowerCamelCase__          =     True
				lowerCamelCase__          =     None







class 				_lowerCAmelCase		(  a__						):
				lowerCamelCase__          =     """titi"""
				lowerCamelCase__          =     """toto"""







class 				_lowerCAmelCase		(  a__						):
				lowerCamelCase__          =     """titi"""
				lowerCamelCase__          =     """toto"""
				lowerCamelCase__          =     42







@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     "toto"




				def      __a		(			self				)     ->   Optional[Any]:
											SCREAMING_SNAKE_CASE      :			Tuple						  =BasicEnum(self.foo				)







@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     "toto"




				def      __a		(			self				)     ->   List[str]:
											SCREAMING_SNAKE_CASE      :			Dict						  =MixedTypeEnum(self.foo				)







@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     None
				lowerCamelCase__          =     field(default=a__	, metadata={'help': 'help message'}						)
				lowerCamelCase__          =     None
				lowerCamelCase__          =     list_field(default=[]						)
				lowerCamelCase__          =     list_field(default=[]						)







@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     list_field(default=[]						)
				lowerCamelCase__          =     list_field(default=[1, 2, 3]						)
				lowerCamelCase__          =     list_field(default=['Hallo', 'Bonjour', 'Hello']						)
				lowerCamelCase__          =     list_field(default=[0.1, 0.2, 0.3]						)







@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     field()
				lowerCamelCase__          =     field()
				lowerCamelCase__          =     field()




				def      __a		(			self				)     ->   Union[str, Any]:
											SCREAMING_SNAKE_CASE      :			List[Any]						  =BasicEnum(self.required_enum				)







@dataclass
class 				_lowerCAmelCase		:
				lowerCamelCase__          =     42
				lowerCamelCase__          =     field()
				lowerCamelCase__          =     None
				lowerCamelCase__          =     field(default='toto'	, metadata={'help': 'help message'}						)
				lowerCamelCase__          =     list_field(default=['Hallo', 'Bonjour', 'Hello']						)


if is_python_no_less_than_3_10:


							@dataclass
							class 				_lowerCAmelCase		:
											lowerCamelCase__          =     False
											lowerCamelCase__          =     True
											lowerCamelCase__          =     None







							@dataclass
							class 				_lowerCAmelCase		:
											lowerCamelCase__          =     None
											lowerCamelCase__          =     field(default=a__	, metadata={'help': 'help message'}						)
											lowerCamelCase__          =     None
											lowerCamelCase__          =     list_field(default=[]						)
											lowerCamelCase__          =     list_field(default=[]						)


class 				_lowerCAmelCase		(  unittest.TestCase						):




				def      __a		(			self		,		snake_case_		,		snake_case_				)     ->   Dict:
											self.assertEqual(len(a._actions				)		,		len(b._actions				)				)
											for x, y in zip(a._actions		,		b._actions				):
																		SCREAMING_SNAKE_CASE      :			Optional[int]						  ={k: v for k, v in vars(lowerCAmelCase__				).items() if k != "container"}
																		SCREAMING_SNAKE_CASE      :			Optional[int]						  ={k: v for k, v in vars(lowerCAmelCase__				).items() if k != "container"}

																		# Choices with mixed type have custom function as "type"
																		# So we need to compare results directly for equality
																		if xx.get('''choices'''		,		lowerCAmelCase__				) and yy.get('''choices'''		,		lowerCAmelCase__				):
																									for expected_choice in yy["choices"] + xx["choices"]:
																																self.assertEqual(xx['''type'''](lowerCAmelCase__				)		,		yy['''type'''](lowerCAmelCase__				)				)
																									del xx["type"], yy["type"]

																		self.assertEqual(lowerCAmelCase__		,		lowerCAmelCase__				)




				def      __a		(			self				)     ->   List[Any]:
											SCREAMING_SNAKE_CASE      :			int						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Tuple						  =argparse.ArgumentParser()
											expected.add_argument('''--foo'''		,		type=lowerCAmelCase__		,		required=lowerCAmelCase__				)
											expected.add_argument('''--bar'''		,		type=lowerCAmelCase__		,		required=lowerCAmelCase__				)
											expected.add_argument('''--baz'''		,		type=lowerCAmelCase__		,		required=lowerCAmelCase__				)
											expected.add_argument('''--flag'''		,		type=lowerCAmelCase__		,		default=lowerCAmelCase__		,		const=lowerCAmelCase__		,		nargs='''?'''				)
											self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Optional[int]						  =["--foo", "1", "--baz", "quux", "--bar", "0.5"]
											(SCREAMING_SNAKE_CASE			)      :			Optional[Any]						  =parser.parse_args_into_dataclasses(lowerCAmelCase__		,		look_for_args_file=lowerCAmelCase__				)
											self.assertFalse(example.flag				)




				def      __a		(			self				)     ->   str:
											SCREAMING_SNAKE_CASE      :			str						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Optional[Any]						  =argparse.ArgumentParser()
											expected.add_argument('''--foo'''		,		default=42		,		type=lowerCAmelCase__				)
											expected.add_argument('''--baz'''		,		default='''toto'''		,		type=lowerCAmelCase__		,		help='''help message'''				)
											self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)




				def      __a		(			self				)     ->   int:
											SCREAMING_SNAKE_CASE      :			List[str]						  =argparse.ArgumentParser()
											expected.add_argument('''--foo'''		,		type=lowerCAmelCase__		,		default=lowerCAmelCase__		,		const=lowerCAmelCase__		,		nargs='''?'''				)
											expected.add_argument('''--baz'''		,		type=lowerCAmelCase__		,		default=lowerCAmelCase__		,		const=lowerCAmelCase__		,		nargs='''?'''				)
											# A boolean no_* argument always has to come after its "default: True" regular counter-part
											# and its default must be set to False
											expected.add_argument('''--no_baz'''		,		action='''store_false'''		,		default=lowerCAmelCase__		,		dest='''baz'''				)
											expected.add_argument('''--opt'''		,		type=lowerCAmelCase__		,		default=lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			List[str]						  =[WithDefaultBoolExample]
											if is_python_no_less_than_3_10:
																		dataclass_types.append(lowerCAmelCase__				)

											for dataclass_type in dataclass_types:
																		SCREAMING_SNAKE_CASE      :			int						  =HfArgumentParser(lowerCAmelCase__				)
																		self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)

																		SCREAMING_SNAKE_CASE      :			Optional[int]						  =parser.parse_args([]				)
																		self.assertEqual(lowerCAmelCase__		,		Namespace(foo=lowerCAmelCase__		,		baz=lowerCAmelCase__		,		opt=lowerCAmelCase__				)				)

																		SCREAMING_SNAKE_CASE      :			str						  =parser.parse_args(['''--foo''', '''--no_baz''']				)
																		self.assertEqual(lowerCAmelCase__		,		Namespace(foo=lowerCAmelCase__		,		baz=lowerCAmelCase__		,		opt=lowerCAmelCase__				)				)

																		SCREAMING_SNAKE_CASE      :			Union[str, Any]						  =parser.parse_args(['''--foo''', '''--baz''']				)
																		self.assertEqual(lowerCAmelCase__		,		Namespace(foo=lowerCAmelCase__		,		baz=lowerCAmelCase__		,		opt=lowerCAmelCase__				)				)

																		SCREAMING_SNAKE_CASE      :			Optional[int]						  =parser.parse_args(['''--foo''', '''True''', '''--baz''', '''True''', '''--opt''', '''True''']				)
																		self.assertEqual(lowerCAmelCase__		,		Namespace(foo=lowerCAmelCase__		,		baz=lowerCAmelCase__		,		opt=lowerCAmelCase__				)				)

																		SCREAMING_SNAKE_CASE      :			Union[str, Any]						  =parser.parse_args(['''--foo''', '''False''', '''--baz''', '''False''', '''--opt''', '''False''']				)
																		self.assertEqual(lowerCAmelCase__		,		Namespace(foo=lowerCAmelCase__		,		baz=lowerCAmelCase__		,		opt=lowerCAmelCase__				)				)




				def      __a		(			self				)     ->   Optional[int]:
											SCREAMING_SNAKE_CASE      :			Any						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			List[str]						  =argparse.ArgumentParser()
											expected.add_argument(
											    '''--foo'''		,		default='''toto'''		,		choices=['''titi''', '''toto''', 42]		,		type=make_choice_type_function(['''titi''', '''toto''', 42]				)		,		)
											self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			str						  =parser.parse_args([]				)
											self.assertEqual(args.foo		,		'''toto'''				)
											SCREAMING_SNAKE_CASE      :			List[str]						  =parser.parse_args_into_dataclasses([]				)[0]
											self.assertEqual(enum_ex.foo		,		MixedTypeEnum.toto				)

											SCREAMING_SNAKE_CASE      :			Dict						  =parser.parse_args(['''--foo''', '''titi''']				)
											self.assertEqual(args.foo		,		'''titi'''				)
											SCREAMING_SNAKE_CASE      :			List[str]						  =parser.parse_args_into_dataclasses(['''--foo''', '''titi''']				)[0]
											self.assertEqual(enum_ex.foo		,		MixedTypeEnum.titi				)

											SCREAMING_SNAKE_CASE      :			Optional[Any]						  =parser.parse_args(['''--foo''', '''42''']				)
											self.assertEqual(args.foo		,		42				)
											SCREAMING_SNAKE_CASE      :			Any						  =parser.parse_args_into_dataclasses(['''--foo''', '''42''']				)[0]
											self.assertEqual(enum_ex.foo		,		MixedTypeEnum.fourtytwo				)




				def      __a		(			self				)     ->   int:


											@dataclass
											class 				_lowerCAmelCase		:
															lowerCamelCase__          =     "toto"







											SCREAMING_SNAKE_CASE      :			Any						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			str						  =argparse.ArgumentParser()
											expected.add_argument(
											    '''--foo'''		,		default='''toto'''		,		choices=('''titi''', '''toto''', 42)		,		type=make_choice_type_function(['''titi''', '''toto''', 42]				)		,		)
											self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Dict						  =parser.parse_args([]				)
											self.assertEqual(args.foo		,		'''toto'''				)

											SCREAMING_SNAKE_CASE      :			List[str]						  =parser.parse_args(['''--foo''', '''titi''']				)
											self.assertEqual(args.foo		,		'''titi'''				)

											SCREAMING_SNAKE_CASE      :			Optional[int]						  =parser.parse_args(['''--foo''', '''42''']				)
											self.assertEqual(args.foo		,		42				)




				def      __a		(			self				)     ->   Any:
											SCREAMING_SNAKE_CASE      :			List[Any]						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Optional[Any]						  =argparse.ArgumentParser()
											expected.add_argument('''--foo_int'''		,		nargs='''+'''		,		default=[]		,		type=lowerCAmelCase__				)
											expected.add_argument('''--bar_int'''		,		nargs='''+'''		,		default=[1, 2, 3]		,		type=lowerCAmelCase__				)
											expected.add_argument('''--foo_str'''		,		nargs='''+'''		,		default=['''Hallo''', '''Bonjour''', '''Hello''']		,		type=lowerCAmelCase__				)
											expected.add_argument('''--foo_float'''		,		nargs='''+'''		,		default=[0.1, 0.2, 0.3]		,		type=lowerCAmelCase__				)

											self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			int						  =parser.parse_args([]				)
											self.assertEqual(
											    lowerCAmelCase__		,		Namespace(foo_int=[]		,		bar_int=[1, 2, 3]		,		foo_str=['''Hallo''', '''Bonjour''', '''Hello''']		,		foo_float=[0.1, 0.2, 0.3]				)		,		)

											SCREAMING_SNAKE_CASE      :			List[Any]						  =parser.parse_args('''--foo_int 1 --bar_int 2 3 --foo_str a b c --foo_float 0.1 0.7'''.split()				)
											self.assertEqual(lowerCAmelCase__		,		Namespace(foo_int=[1]		,		bar_int=[2, 3]		,		foo_str=['''a''', '''b''', '''c''']		,		foo_float=[0.1, 0.7]				)				)




				def      __a		(			self				)     ->   Optional[Any]:
											SCREAMING_SNAKE_CASE      :			Dict						  =argparse.ArgumentParser()
											expected.add_argument('''--foo'''		,		default=lowerCAmelCase__		,		type=lowerCAmelCase__				)
											expected.add_argument('''--bar'''		,		default=lowerCAmelCase__		,		type=lowerCAmelCase__		,		help='''help message'''				)
											expected.add_argument('''--baz'''		,		default=lowerCAmelCase__		,		type=lowerCAmelCase__				)
											expected.add_argument('''--ces'''		,		nargs='''+'''		,		default=[]		,		type=lowerCAmelCase__				)
											expected.add_argument('''--des'''		,		nargs='''+'''		,		default=[]		,		type=lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			str						  =[OptionalExample]
											if is_python_no_less_than_3_10:
																		dataclass_types.append(lowerCAmelCase__				)

											for dataclass_type in dataclass_types:
																		SCREAMING_SNAKE_CASE      :			Optional[int]						  =HfArgumentParser(lowerCAmelCase__				)

																		self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)

																		SCREAMING_SNAKE_CASE      :			Tuple						  =parser.parse_args([]				)
																		self.assertEqual(lowerCAmelCase__		,		Namespace(foo=lowerCAmelCase__		,		bar=lowerCAmelCase__		,		baz=lowerCAmelCase__		,		ces=[]		,		des=[]				)				)

																		SCREAMING_SNAKE_CASE      :			Any						  =parser.parse_args('''--foo 12 --bar 3.14 --baz 42 --ces a b c --des 1 2 3'''.split()				)
																		self.assertEqual(lowerCAmelCase__		,		Namespace(foo=12		,		bar=3.14		,		baz='''42'''		,		ces=['''a''', '''b''', '''c''']		,		des=[1, 2, 3]				)				)




				def      __a		(			self				)     ->   str:
											SCREAMING_SNAKE_CASE      :			Optional[Any]						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Dict						  =argparse.ArgumentParser()
											expected.add_argument('''--required_list'''		,		nargs='''+'''		,		type=lowerCAmelCase__		,		required=lowerCAmelCase__				)
											expected.add_argument('''--required_str'''		,		type=lowerCAmelCase__		,		required=lowerCAmelCase__				)
											expected.add_argument(
											    '''--required_enum'''		,		type=make_choice_type_function(['''titi''', '''toto''']				)		,		choices=['''titi''', '''toto''']		,		required=lowerCAmelCase__		,		)
											self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)




				def      __a		(			self				)     ->   int:
											SCREAMING_SNAKE_CASE      :			int						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Tuple						  =argparse.ArgumentParser()
											expected.add_argument('''--foo'''		,		type=lowerCAmelCase__		,		required=lowerCAmelCase__				)
											expected.add_argument(
											    '''--required_enum'''		,		type=make_choice_type_function(['''titi''', '''toto''']				)		,		choices=['''titi''', '''toto''']		,		required=lowerCAmelCase__		,		)
											expected.add_argument('''--opt'''		,		type=lowerCAmelCase__		,		default=lowerCAmelCase__				)
											expected.add_argument('''--baz'''		,		default='''toto'''		,		type=lowerCAmelCase__		,		help='''help message'''				)
											expected.add_argument('''--foo_str'''		,		nargs='''+'''		,		default=['''Hallo''', '''Bonjour''', '''Hello''']		,		type=lowerCAmelCase__				)
											self.argparsersEqual(lowerCAmelCase__		,		lowerCAmelCase__				)




				def      __a		(			self				)     ->   int:
											SCREAMING_SNAKE_CASE      :			Union[str, Any]						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Any						  ={
											    "foo": 12,
											    "bar": 3.14,
											    "baz": "42",
											    "flag": True,
											}

											SCREAMING_SNAKE_CASE      :			Optional[Any]						  =parser.parse_dict(lowerCAmelCase__				)[0]
											SCREAMING_SNAKE_CASE      :			Optional[Any]						  =BasicExample(**lowerCAmelCase__				)
											self.assertEqual(lowerCAmelCase__		,		lowerCAmelCase__				)




				def      __a		(			self				)     ->   str:
											SCREAMING_SNAKE_CASE      :			Dict						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			str						  ={
											    "foo": 12,
											    "bar": 3.14,
											    "baz": "42",
											    "flag": True,
											    "extra": 42,
											}

											self.assertRaises(lowerCAmelCase__		,		parser.parse_dict		,		lowerCAmelCase__		,		allow_extra_keys=lowerCAmelCase__				)




				def      __a		(			self				)     ->   Any:
											SCREAMING_SNAKE_CASE      :			int						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			List[Any]						  ={
											    "foo": 12,
											    "bar": 3.14,
											    "baz": "42",
											    "flag": True,
											}
											with tempfile.TemporaryDirectory() as tmp_dir:
																		SCREAMING_SNAKE_CASE      :			Optional[int]						  =os.path.join(lowerCAmelCase__		,		'''temp_json'''				)
																		os.mkdir(lowerCAmelCase__				)
																		with open(temp_local_path + '''.json'''		,		'''w+'''				) as f:
																									json.dump(lowerCAmelCase__		,		lowerCAmelCase__				)
																		SCREAMING_SNAKE_CASE      :			Optional[int]						  =parser.parse_yaml_file(Path(temp_local_path + '''.json'''				)				)[0]

											SCREAMING_SNAKE_CASE      :			Dict						  =BasicExample(**lowerCAmelCase__				)
											self.assertEqual(lowerCAmelCase__		,		lowerCAmelCase__				)




				def      __a		(			self				)     ->   Any:
											SCREAMING_SNAKE_CASE      :			List[Any]						  =HfArgumentParser(lowerCAmelCase__				)

											SCREAMING_SNAKE_CASE      :			Tuple						  ={
											    "foo": 12,
											    "bar": 3.14,
											    "baz": "42",
											    "flag": True,
											}
											with tempfile.TemporaryDirectory() as tmp_dir:
																		SCREAMING_SNAKE_CASE      :			Any						  =os.path.join(lowerCAmelCase__		,		'''temp_yaml'''				)
																		os.mkdir(lowerCAmelCase__				)
																		with open(temp_local_path + '''.yaml'''		,		'''w+'''				) as f:
																									yaml.dump(lowerCAmelCase__		,		lowerCAmelCase__				)
																		SCREAMING_SNAKE_CASE      :			Dict						  =parser.parse_yaml_file(Path(temp_local_path + '''.yaml'''				)				)[0]
											SCREAMING_SNAKE_CASE      :			str						  =BasicExample(**lowerCAmelCase__				)
											self.assertEqual(lowerCAmelCase__		,		lowerCAmelCase__				)







				def      __a		(			self				)     ->   str:
											SCREAMING_SNAKE_CASE      :			Optional[int]						  =HfArgumentParser(lowerCAmelCase__				)
											self.assertIsNotNone(lowerCAmelCase__				)













"""simple docstring"""




import functools
import operator

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


a		:					List[Any]	      =     logging.get_logger(__name__)

a		:					List[Any]	      =     {
    '''microsoft/unispeech-sat-base-100h-libri-ft''': (
        '''https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft/resolve/main/config.json'''
    ),
    # See all UniSpeechSat models at https://huggingface.co/models?filter=unispeech_sat
}


class 			__UpperCamelCase							(		a__		):
							lowerCamelCase  :   Tuple    ="""unispeech-sat"""






							def __init__(  self ,   lowerCAmelCase__=32 ,   lowerCAmelCase__=768 ,   lowerCAmelCase__=12 ,   lowerCAmelCase__=12 ,   lowerCAmelCase__=3072 ,   lowerCAmelCase__="gelu" ,   lowerCAmelCase__=0.1 ,   lowerCAmelCase__=0.1 ,   lowerCAmelCase__=0.1 ,   lowerCAmelCase__=0.0 ,   lowerCAmelCase__=0.0 ,   lowerCAmelCase__=0.1 ,   lowerCAmelCase__=0.1 ,   lowerCAmelCase__=0.02 ,   lowerCAmelCase__=1E-5 ,   lowerCAmelCase__="group" ,   lowerCAmelCase__="gelu" ,   lowerCAmelCase__=(512, 512, 512, 512, 512, 512, 512) ,   lowerCAmelCase__=(5, 2, 2, 2, 2, 2, 2) ,   lowerCAmelCase__=(10, 3, 3, 3, 3, 2, 2) ,   lowerCAmelCase__=False ,   lowerCAmelCase__=128 ,   lowerCAmelCase__=16 ,   lowerCAmelCase__=False ,   lowerCAmelCase__=True ,   lowerCAmelCase__=0.05 ,   lowerCAmelCase__=10 ,   lowerCAmelCase__=2 ,   lowerCAmelCase__=0.0 ,   lowerCAmelCase__=10 ,   lowerCAmelCase__=0 ,   lowerCAmelCase__=320 ,   lowerCAmelCase__=2 ,   lowerCAmelCase__=0.1 ,   lowerCAmelCase__=100 ,   lowerCAmelCase__=256 ,   lowerCAmelCase__=256 ,   lowerCAmelCase__=0.1 ,   lowerCAmelCase__="mean" ,   lowerCAmelCase__=False ,   lowerCAmelCase__=False ,   lowerCAmelCase__=256 ,   lowerCAmelCase__=(512, 512, 512, 512, 1500) ,   lowerCAmelCase__=(5, 3, 3, 1, 1) ,   lowerCAmelCase__=(1, 2, 3, 1, 1) ,   lowerCAmelCase__=512 ,   lowerCAmelCase__=0 ,   lowerCAmelCase__=1 ,   lowerCAmelCase__=2 ,   lowerCAmelCase__=504 ,   **lowerCAmelCase__ ,   )      ->					List[str]:
								super().__init__(**lowerCAmelCase__ ,   pad_token_id=lowerCAmelCase__ ,   bos_token_id=lowerCAmelCase__ ,   eos_token_id=lowerCAmelCase__ )
								a :						Any      =							hidden_size
								a :						Tuple      =							feat_extract_norm
								a :						Tuple      =							feat_extract_activation
								a :						Dict      =							list(lowerCAmelCase__ )
								a :						int      =							list(lowerCAmelCase__ )
								a :						Optional[Any]      =							list(lowerCAmelCase__ )
								a :						int      =							conv_bias
								a :						str      =							num_conv_pos_embeddings
								a :						Dict      =							num_conv_pos_embedding_groups
								a :						Optional[int]      =							len(self.conv_dim )
								a :						int      =							num_hidden_layers
								a :						Any      =							intermediate_size
								a :						Any      =							hidden_act
								a :						List[Any]      =							num_attention_heads
								a :						Any      =							hidden_dropout
								a :						Union[str, Any]      =							attention_dropout
								a :						Tuple      =							activation_dropout
								a :						Dict      =							feat_proj_dropout
								a :						Optional[Any]      =							final_dropout
								a :						Union[str, Any]      =							layerdrop
								a :						str      =							layer_norm_eps
								a :						Optional[int]      =							initializer_range
								a :						Optional[int]      =							vocab_size
								a :						str      =							num_clusters
								a :						Any      =							do_stable_layer_norm
								a :						str      =							use_weighted_layer_sum

								if (
								    (len(self.conv_stride ) != self.num_feat_extract_layers)
								    or (len(self.conv_kernel ) != self.num_feat_extract_layers)
								    or (len(self.conv_dim ) != self.num_feat_extract_layers)
								):
									raise ValueError(
									    "Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="
									    " `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="
									    f""" {len(self.conv_dim )}`, `len(config.conv_stride) = {len(self.conv_stride )}`,"""
									    f""" `len(config.conv_kernel) = {len(self.conv_kernel )}`.""" )

								# fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
								a :						List[Any]      =							apply_spec_augment
								a :						int      =							mask_time_prob
								a :						Optional[int]      =							mask_time_length
								a :						Dict      =							mask_time_min_masks
								a :						Optional[int]      =							mask_feature_prob
								a :						List[str]      =							mask_feature_length
								a :						Dict      =							mask_feature_min_masks

								# parameters for pretraining with codevector quantized representations
								a :						List[str]      =							num_codevectors_per_group
								a :						List[Any]      =							num_codevector_groups
								a :						Tuple      =							contrastive_logits_temperature
								a :						int      =							feat_quantizer_dropout
								a :						Optional[Any]      =							num_negatives
								a :						Optional[int]      =							codevector_dim
								a :						Tuple      =							proj_codevector_dim
								a :						Optional[int]      =							diversity_loss_weight

								# ctc loss
								a :						Dict      =							ctc_loss_reduction
								a :						Optional[Any]      =							ctc_zero_infinity

								# SequenceClassification-specific parameter. Feel free to ignore for other classes.
								a :						Dict      =							classifier_proj_size

								# XVector-specific parameters. Feel free to ignore for other classes.
								a :						Union[str, Any]      =							list(lowerCAmelCase__ )
								a :						List[str]      =							list(lowerCAmelCase__ )
								a :						Tuple      =							list(lowerCAmelCase__ )
								a :						Optional[int]      =							xvector_output_dim






							@property
							def        __a  (  self )      ->					Any:
								return functools.reduce(operator.mul ,   self.conv_stride ,   1 )


