


'''simple docstring'''







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
_SCREAMING_SNAKE_CASE							: List[str]										=			sys.version_info >= (3, 10)



def     _UpperCamelCase				(			UpperCamelCase__=None  , UpperCamelCase__=None		):






				"""simple docstring"""



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






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   42
						__snake_case				=   42
						__snake_case				=   42
						__snake_case				=   42






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   4_2
						__snake_case				=   field(default="toto"	,	metadata={"help": "help message"}		)






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   False
						__snake_case				=   True
						__snake_case				=   None






class 		_snake_case     (					__lowerCAmelCase		):






						'''simple docstring'''







						__snake_case				=   """titi"""
						__snake_case				=   """toto"""






class 		_snake_case     (					__lowerCAmelCase		):






						'''simple docstring'''







						__snake_case				=   """titi"""
						__snake_case				=   """toto"""
						__snake_case				=   4_2






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   "toto"







						def lowerCAmelCase__			(	self:						Tuple  )				->						Tuple:
										__magic_name__					:       int    							=							BasicEnum(self.foo  )






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   "toto"







						def lowerCAmelCase__			(	self:						str  )				->						Any:
										__magic_name__					:       Dict    							=							MixedTypeEnum(self.foo  )






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   None
						__snake_case				=   field(default=__lowerCAmelCase	,	metadata={"help": "help message"}		)
						__snake_case				=   None
						__snake_case				=   list_field(default=[]		)
						__snake_case				=   list_field(default=[]		)






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   list_field(default=[]		)
						__snake_case				=   list_field(default=[1, 2, 3]		)
						__snake_case				=   list_field(default=["Hallo", "Bonjour", "Hello"]		)
						__snake_case				=   list_field(default=[0.1, 0.2, 0.3]		)






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   field()
						__snake_case				=   field()
						__snake_case				=   field()







						def lowerCAmelCase__			(	self:						Optional[int]  )				->						Dict:
										__magic_name__					:       Dict    							=							BasicEnum(self.required_enum  )






@dataclass
class 		_snake_case     :






						'''simple docstring'''







						__snake_case				=   42
						__snake_case				=   field()
						__snake_case				=   None
						__snake_case				=   field(default="toto"	,	metadata={"help": "help message"}		)
						__snake_case				=   list_field(default=["Hallo", "Bonjour", "Hello"]		)


if is_python_no_less_than_3_10:






		@dataclass
		class 		_snake_case     :






								'''simple docstring'''







								__snake_case				=   False
								__snake_case				=   True
								__snake_case				=   None






		@dataclass
		class 		_snake_case     :






								'''simple docstring'''







								__snake_case				=   None
								__snake_case				=   field(default=__lowerCAmelCase	,	metadata={"help": "help message"}		)
								__snake_case				=   None
								__snake_case				=   list_field(default=[]		)
								__snake_case				=   list_field(default=[]		)






class 		_snake_case     (					unittest.TestCase		):






						'''simple docstring'''







						def lowerCAmelCase__			(	self:						List[Any]   ,				__UpperCamelCase:						Dict   ,				__UpperCamelCase:						Dict  )				->						Optional[Any]:
										self.assertEqual(len(a._actions  )   ,				len(b._actions  )  )
										for x, y in zip(a._actions   ,				b._actions  ):
														__magic_name__					:       Dict    							=							{k: v for k, v in vars(_SCREAMING_SNAKE_CASE  ).items() if k != "container"}
														__magic_name__					:       Optional[int]    							=							{k: v for k, v in vars(_SCREAMING_SNAKE_CASE  ).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"   ,				_SCREAMING_SNAKE_CASE  ) and yy.get("choices"   ,				_SCREAMING_SNAKE_CASE  ):
																		for expected_choice in yy["choices"] + xx["choices"]:
																						self.assertEqual(xx["type"](_SCREAMING_SNAKE_CASE  )   ,				yy["type"](_SCREAMING_SNAKE_CASE  )  )
																		del xx["type"], yy["type"]

														self.assertEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )







						def lowerCAmelCase__			(	self:						Union[str, Any]  )				->						Optional[Any]:
										__magic_name__					:       Union[str, Any]    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       int    							=							argparse.ArgumentParser()
										expected.add_argument("--foo"   ,				type=_SCREAMING_SNAKE_CASE   ,				required=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--bar"   ,				type=_SCREAMING_SNAKE_CASE   ,				required=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--baz"   ,				type=_SCREAMING_SNAKE_CASE   ,				required=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--flag"   ,				type=_SCREAMING_SNAKE_CASE   ,				default=_SCREAMING_SNAKE_CASE   ,				const=_SCREAMING_SNAKE_CASE   ,				nargs="?"  )
										self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       List[str]    							=							["--foo", "1", "--baz", "quux", "--bar", "0.5"]
										((__magic_name__   )							,     )					:       Dict    							=							parser.parse_args_into_dataclasses(_SCREAMING_SNAKE_CASE   ,				look_for_args_file=_SCREAMING_SNAKE_CASE  )
										self.assertFalse(example.flag  )







						def lowerCAmelCase__			(	self:						List[str]  )				->						Optional[Any]:
										__magic_name__					:       str    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Tuple    							=							argparse.ArgumentParser()
										expected.add_argument("--foo"   ,				default=42   ,				type=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--baz"   ,				default="toto"   ,				type=_SCREAMING_SNAKE_CASE   ,				help="help message"  )
										self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )







						def lowerCAmelCase__			(	self:						Dict  )				->						Dict:
										__magic_name__					:       Tuple    							=							argparse.ArgumentParser()
										expected.add_argument("--foo"   ,				type=_SCREAMING_SNAKE_CASE   ,				default=_SCREAMING_SNAKE_CASE   ,				const=_SCREAMING_SNAKE_CASE   ,				nargs="?"  )
										expected.add_argument("--baz"   ,				type=_SCREAMING_SNAKE_CASE   ,				default=_SCREAMING_SNAKE_CASE   ,				const=_SCREAMING_SNAKE_CASE   ,				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=_SCREAMING_SNAKE_CASE   ,				dest="baz"  )
										expected.add_argument("--opt"   ,				type=_SCREAMING_SNAKE_CASE   ,				default=_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       str    							=							[WithDefaultBoolExample]
										if is_python_no_less_than_3_10:
														dataclass_types.append(_SCREAMING_SNAKE_CASE  )

										for dataclass_type in dataclass_types:
														__magic_name__					:       Optional[Any]    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )
														self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )

														__magic_name__					:       int    							=							parser.parse_args([]  )
														self.assertEqual(_SCREAMING_SNAKE_CASE   ,				Namespace(foo=_SCREAMING_SNAKE_CASE   ,				baz=_SCREAMING_SNAKE_CASE   ,				opt=_SCREAMING_SNAKE_CASE  )  )

														__magic_name__					:       List[Any]    							=							parser.parse_args(["--foo", "--no_baz"]  )
														self.assertEqual(_SCREAMING_SNAKE_CASE   ,				Namespace(foo=_SCREAMING_SNAKE_CASE   ,				baz=_SCREAMING_SNAKE_CASE   ,				opt=_SCREAMING_SNAKE_CASE  )  )

														__magic_name__					:       List[Any]    							=							parser.parse_args(["--foo", "--baz"]  )
														self.assertEqual(_SCREAMING_SNAKE_CASE   ,				Namespace(foo=_SCREAMING_SNAKE_CASE   ,				baz=_SCREAMING_SNAKE_CASE   ,				opt=_SCREAMING_SNAKE_CASE  )  )

														__magic_name__					:       List[Any]    							=							parser.parse_args(["--foo", "True", "--baz", "True", "--opt", "True"]  )
														self.assertEqual(_SCREAMING_SNAKE_CASE   ,				Namespace(foo=_SCREAMING_SNAKE_CASE   ,				baz=_SCREAMING_SNAKE_CASE   ,				opt=_SCREAMING_SNAKE_CASE  )  )

														__magic_name__					:       Optional[Any]    							=							parser.parse_args(["--foo", "False", "--baz", "False", "--opt", "False"]  )
														self.assertEqual(_SCREAMING_SNAKE_CASE   ,				Namespace(foo=_SCREAMING_SNAKE_CASE   ,				baz=_SCREAMING_SNAKE_CASE   ,				opt=_SCREAMING_SNAKE_CASE  )  )







						def lowerCAmelCase__			(	self:						Tuple  )				->						int:
										__magic_name__					:       Optional[Any]    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Optional[Any]    							=							argparse.ArgumentParser()
										expected.add_argument(
										    "--foo"   ,				default="toto"   ,				choices=["titi", "toto", 42]   ,				type=make_choice_type_function(["titi", "toto", 42]  )   ,				)
										self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Union[str, Any]    							=							parser.parse_args([]  )
										self.assertEqual(args.foo   ,				"toto"  )
										__magic_name__					:       int    							=							parser.parse_args_into_dataclasses([]  )[0]
										self.assertEqual(enum_ex.foo   ,				MixedTypeEnum.toto  )

										__magic_name__					:       List[Any]    							=							parser.parse_args(["--foo", "titi"]  )
										self.assertEqual(args.foo   ,				"titi"  )
										__magic_name__					:       str    							=							parser.parse_args_into_dataclasses(["--foo", "titi"]  )[0]
										self.assertEqual(enum_ex.foo   ,				MixedTypeEnum.titi  )

										__magic_name__					:       List[str]    							=							parser.parse_args(["--foo", "42"]  )
										self.assertEqual(args.foo   ,				42  )
										__magic_name__					:       Optional[Any]    							=							parser.parse_args_into_dataclasses(["--foo", "42"]  )[0]
										self.assertEqual(enum_ex.foo   ,				MixedTypeEnum.fourtytwo  )







						def lowerCAmelCase__			(	self:						Dict  )				->						str:






										@dataclass
										class 		_snake_case     :






																'''simple docstring'''







																__snake_case				=   "toto"






										__magic_name__					:       Optional[Any]    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Dict    							=							argparse.ArgumentParser()
										expected.add_argument(
										    "--foo"   ,				default="toto"   ,				choices=("titi", "toto", 42)   ,				type=make_choice_type_function(["titi", "toto", 42]  )   ,				)
										self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       List[str]    							=							parser.parse_args([]  )
										self.assertEqual(args.foo   ,				"toto"  )

										__magic_name__					:       Tuple    							=							parser.parse_args(["--foo", "titi"]  )
										self.assertEqual(args.foo   ,				"titi"  )

										__magic_name__					:       str    							=							parser.parse_args(["--foo", "42"]  )
										self.assertEqual(args.foo   ,				42  )







						def lowerCAmelCase__			(	self:						Optional[int]  )				->						Any:
										__magic_name__					:       List[Any]    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

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

										self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Tuple    							=							parser.parse_args([]  )
										self.assertEqual(
										    _SCREAMING_SNAKE_CASE   ,				Namespace(foo_int=[]   ,				bar_int=[1, 2, 3]   ,				foo_str=["Hallo", "Bonjour", "Hello"]   ,				foo_float=[0.1, 0.2, 0.3]  )   ,				)

										__magic_name__					:       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(_SCREAMING_SNAKE_CASE   ,				Namespace(foo_int=[1]   ,				bar_int=[2, 3]   ,				foo_str=["a", "b", "c"]   ,				foo_float=[0.1, 0.7]  )  )







						def lowerCAmelCase__			(	self:						List[str]  )				->						Optional[Any]:
										__magic_name__					:       Tuple    							=							argparse.ArgumentParser()
										expected.add_argument("--foo"   ,				default=_SCREAMING_SNAKE_CASE   ,				type=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--bar"   ,				default=_SCREAMING_SNAKE_CASE   ,				type=_SCREAMING_SNAKE_CASE   ,				help="help message"  )
										expected.add_argument("--baz"   ,				default=_SCREAMING_SNAKE_CASE   ,				type=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--ces"   ,				nargs="+"   ,				default=[]   ,				type=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--des"   ,				nargs="+"   ,				default=[]   ,				type=_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Optional[int]    							=							[OptionalExample]
										if is_python_no_less_than_3_10:
														dataclass_types.append(_SCREAMING_SNAKE_CASE  )

										for dataclass_type in dataclass_types:
														__magic_name__					:       Dict    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

														self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )

														__magic_name__					:       Union[str, Any]    							=							parser.parse_args([]  )
														self.assertEqual(_SCREAMING_SNAKE_CASE   ,				Namespace(foo=_SCREAMING_SNAKE_CASE   ,				bar=_SCREAMING_SNAKE_CASE   ,				baz=_SCREAMING_SNAKE_CASE   ,				ces=[]   ,				des=[]  )  )

														__magic_name__					:       Tuple    							=							parser.parse_args("--foo 12 --bar 3.14 --baz 42 --ces a b c --des 1 2 3".split()  )
														self.assertEqual(_SCREAMING_SNAKE_CASE   ,				Namespace(foo=12   ,				bar=3.1_4   ,				baz="42"   ,				ces=["a", "b", "c"]   ,				des=[1, 2, 3]  )  )







						def lowerCAmelCase__			(	self:						Dict  )				->						List[Any]:
										__magic_name__					:       Any    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       int    							=							argparse.ArgumentParser()
										expected.add_argument("--required_list"   ,				nargs="+"   ,				type=_SCREAMING_SNAKE_CASE   ,				required=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--required_str"   ,				type=_SCREAMING_SNAKE_CASE   ,				required=_SCREAMING_SNAKE_CASE  )
										expected.add_argument(
										    "--required_enum"   ,				type=make_choice_type_function(["titi", "toto"]  )   ,				choices=["titi", "toto"]   ,				required=_SCREAMING_SNAKE_CASE   ,				)
										self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )







						def lowerCAmelCase__			(	self:						Union[str, Any]  )				->						str:
										__magic_name__					:       Union[str, Any]    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       List[str]    							=							argparse.ArgumentParser()
										expected.add_argument("--foo"   ,				type=_SCREAMING_SNAKE_CASE   ,				required=_SCREAMING_SNAKE_CASE  )
										expected.add_argument(
										    "--required_enum"   ,				type=make_choice_type_function(["titi", "toto"]  )   ,				choices=["titi", "toto"]   ,				required=_SCREAMING_SNAKE_CASE   ,				)
										expected.add_argument("--opt"   ,				type=_SCREAMING_SNAKE_CASE   ,				default=_SCREAMING_SNAKE_CASE  )
										expected.add_argument("--baz"   ,				default="toto"   ,				type=_SCREAMING_SNAKE_CASE   ,				help="help message"  )
										expected.add_argument("--foo_str"   ,				nargs="+"   ,				default=["Hallo", "Bonjour", "Hello"]   ,				type=_SCREAMING_SNAKE_CASE  )
										self.argparsersEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )







						def lowerCAmelCase__			(	self:						List[str]  )				->						Tuple:
										__magic_name__					:       Optional[Any]    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Tuple    							=							{
										    "foo": 12,
										    "bar": 3.1_4,
										    "baz": "42",
										    "flag": True,
										}

										__magic_name__					:       str    							=							parser.parse_dict(_SCREAMING_SNAKE_CASE  )[0]
										__magic_name__					:       Optional[Any]    							=							BasicExample(**_SCREAMING_SNAKE_CASE  )
										self.assertEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )







						def lowerCAmelCase__			(	self:						Union[str, Any]  )				->						int:
										__magic_name__					:       Optional[Any]    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Optional[int]    							=							{
										    "foo": 12,
										    "bar": 3.1_4,
										    "baz": "42",
										    "flag": True,
										    "extra": 42,
										}

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







						def lowerCAmelCase__			(	self:						Any  )				->						Any:
										__magic_name__					:       str    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

										__magic_name__					:       Optional[Any]    							=							{
										    "foo": 12,
										    "bar": 3.1_4,
										    "baz": "42",
										    "flag": True,
										}
										with tempfile.TemporaryDirectory() as tmp_dir:
														__magic_name__					:       Union[str, Any]    							=							os.path.join(_SCREAMING_SNAKE_CASE   ,				"temp_json"  )
														os.mkdir(_SCREAMING_SNAKE_CASE  )
														with open(temp_local_path + ".json"   ,				"w+"  ) as f:
																		json.dump(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )
														__magic_name__					:       List[str]    							=							parser.parse_yaml_file(Path(temp_local_path + ".json"  )  )[0]

										__magic_name__					:       Tuple    							=							BasicExample(**_SCREAMING_SNAKE_CASE  )
										self.assertEqual(_SCREAMING_SNAKE_CASE   ,				_SCREAMING_SNAKE_CASE  )







						def lowerCAmelCase__			(	self:						Optional[Any]  )				->						Optional[Any]:
										__magic_name__					:       Any    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )

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







						def lowerCAmelCase__			(	self:						Tuple  )				->						str:
										__magic_name__					:       Any    							=							HfArgumentParser(_SCREAMING_SNAKE_CASE  )
										self.assertIsNotNone(_SCREAMING_SNAKE_CASE  )





'''simple docstring'''





import functools
import operator

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


UpperCamelCase_		:     Optional[Any]          =		logging.get_logger(__name__)

UpperCamelCase_		:     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   _a							(		__lowerCAmelCase				):
     SCREAMING_SNAKE_CASE_				:       str       							=		"""unispeech-sat"""






     def __init__(					self   ,_SCREAMING_SNAKE_CASE=32   ,_SCREAMING_SNAKE_CASE=768   ,_SCREAMING_SNAKE_CASE=12   ,_SCREAMING_SNAKE_CASE=12   ,_SCREAMING_SNAKE_CASE=3_072   ,_SCREAMING_SNAKE_CASE="gelu"   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE=0.0   ,_SCREAMING_SNAKE_CASE=0.0   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE=0.0_2   ,_SCREAMING_SNAKE_CASE=1e-5   ,_SCREAMING_SNAKE_CASE="group"   ,_SCREAMING_SNAKE_CASE="gelu"   ,_SCREAMING_SNAKE_CASE=(512, 512, 512, 512, 512, 512, 512)   ,_SCREAMING_SNAKE_CASE=(5, 2, 2, 2, 2, 2, 2)   ,_SCREAMING_SNAKE_CASE=(10, 3, 3, 3, 3, 2, 2)   ,_SCREAMING_SNAKE_CASE=False   ,_SCREAMING_SNAKE_CASE=128   ,_SCREAMING_SNAKE_CASE=16   ,_SCREAMING_SNAKE_CASE=False   ,_SCREAMING_SNAKE_CASE=True   ,_SCREAMING_SNAKE_CASE=0.0_5   ,_SCREAMING_SNAKE_CASE=10   ,_SCREAMING_SNAKE_CASE=2   ,_SCREAMING_SNAKE_CASE=0.0   ,_SCREAMING_SNAKE_CASE=10   ,_SCREAMING_SNAKE_CASE=0   ,_SCREAMING_SNAKE_CASE=320   ,_SCREAMING_SNAKE_CASE=2   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE=100   ,_SCREAMING_SNAKE_CASE=256   ,_SCREAMING_SNAKE_CASE=256   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE="mean"   ,_SCREAMING_SNAKE_CASE=False   ,_SCREAMING_SNAKE_CASE=False   ,_SCREAMING_SNAKE_CASE=256   ,_SCREAMING_SNAKE_CASE=(512, 512, 512, 512, 1_500)   ,_SCREAMING_SNAKE_CASE=(5, 3, 3, 1, 1)   ,_SCREAMING_SNAKE_CASE=(1, 2, 3, 1, 1)   ,_SCREAMING_SNAKE_CASE=512   ,_SCREAMING_SNAKE_CASE=0   ,_SCREAMING_SNAKE_CASE=1   ,_SCREAMING_SNAKE_CASE=2   ,_SCREAMING_SNAKE_CASE=504   ,**_SCREAMING_SNAKE_CASE   ,)				->     Any:
          super().__init__(**_SCREAMING_SNAKE_CASE   ,pad_token_id=_SCREAMING_SNAKE_CASE   ,bos_token_id=_SCREAMING_SNAKE_CASE   ,eos_token_id=_SCREAMING_SNAKE_CASE       )
          _snake_case				= hidden_size
          _snake_case				= feat_extract_norm
          _snake_case				= feat_extract_activation
          _snake_case				= list(_SCREAMING_SNAKE_CASE       )
          _snake_case				= list(_SCREAMING_SNAKE_CASE       )
          _snake_case				= list(_SCREAMING_SNAKE_CASE       )
          _snake_case				= conv_bias
          _snake_case				= num_conv_pos_embeddings
          _snake_case				= num_conv_pos_embedding_groups
          _snake_case				= len(self.conv_dim       )
          _snake_case				= num_hidden_layers
          _snake_case				= intermediate_size
          _snake_case				= hidden_act
          _snake_case				= num_attention_heads
          _snake_case				= hidden_dropout
          _snake_case				= attention_dropout
          _snake_case				= activation_dropout
          _snake_case				= feat_proj_dropout
          _snake_case				= final_dropout
          _snake_case				= layerdrop
          _snake_case				= layer_norm_eps
          _snake_case				= initializer_range
          _snake_case				= vocab_size
          _snake_case				= num_clusters
          _snake_case				= do_stable_layer_norm
          _snake_case				= 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
          _snake_case				= apply_spec_augment
          _snake_case				= mask_time_prob
          _snake_case				= mask_time_length
          _snake_case				= mask_time_min_masks
          _snake_case				= mask_feature_prob
          _snake_case				= mask_feature_length
          _snake_case				= mask_feature_min_masks

          # parameters for pretraining with codevector quantized representations
          _snake_case				= num_codevectors_per_group
          _snake_case				= num_codevector_groups
          _snake_case				= contrastive_logits_temperature
          _snake_case				= feat_quantizer_dropout
          _snake_case				= num_negatives
          _snake_case				= codevector_dim
          _snake_case				= proj_codevector_dim
          _snake_case				= diversity_loss_weight

          # ctc loss
          _snake_case				= ctc_loss_reduction
          _snake_case				= ctc_zero_infinity

          # SequenceClassification-specific parameter. Feel free to ignore for other classes.
          _snake_case				= classifier_proj_size

          # XVector-specific parameters. Feel free to ignore for other classes.
          _snake_case				= list(_SCREAMING_SNAKE_CASE       )
          _snake_case				= list(_SCREAMING_SNAKE_CASE       )
          _snake_case				= list(_SCREAMING_SNAKE_CASE       )
          _snake_case				= xvector_output_dim






     @property
     def 							_lowercase      (					self       )				->     List[str]:
          return functools.reduce(operator.mul   ,self.conv_stride   ,1       )


