


import copy
import os
import tempfile
from unittest import TestCase
from unittest.mock import patch

import numpy as np
import pyarrow as pa
import pyarrow.parquet as pq
import pytest

from datasets.arrow_writer import ArrowWriter, OptimizedTypedSequence, ParquetWriter, TypedSequence
from datasets.features import ArrayaD, ClassLabel, Features, Image, Value
from datasets.features.features import ArrayaDExtensionType, cast_to_python_objects
from datasets.keyhash import DuplicatedKeysError, InvalidKeyError

from .utils import require_pil


class 					lowerCAmelCase_ (       _a):




						def  _snake_case					(	self						:   List[Any]						)      ->Optional[int]:






									"""simple docstring"""






									a__ :List[Any]						  =    pa.array(TypedSequence([1, 2, 3]						)						)
									self.assertEqual(arr.type   ,     pa.intaa()						)




						def  _snake_case					(	self						:   Union[str, Any]						)      ->Optional[int]:






									"""simple docstring"""






									with self.assertRaises(__A						):
												a__ :List[str]						  =    pa.array(TypedSequence([1, 2, 3]						)   ,     type=pa.intaa()						)




						def  _snake_case					(	self						:   List[str]						)      ->int:






									"""simple docstring"""






									with self.assertRaises(__A						):
												a__ :Optional[int]						  =    pa.array(TypedSequence([1, 2, 3]   ,     try_type=Value("bool"						)   ,     type=Value("int64"						)						)						)




						def  _snake_case					(	self						:   Any						)      ->List[str]:






									"""simple docstring"""






									a__ :Optional[int]						  =    pa.array(TypedSequence([1, 2, 3]   ,     type=Value("int32"						)						)						)
									self.assertEqual(arr.type   ,     pa.intaa()						)




						def  _snake_case					(	self						:   Optional[int]						)      ->List[str]:






									"""simple docstring"""






									with self.assertRaises((TypeError, pa.lib.ArrowInvalid)						):
												a__ :Any						  =    pa.array(TypedSequence(["foo", "bar"]   ,     type=Value("int64"						)						)						)




						def  _snake_case					(	self						:   List[str]						)      ->Optional[Any]:






									"""simple docstring"""






									a__ :Dict						  =    pa.array(TypedSequence([1, 2, 3]   ,     try_type=Value("int32"						)						)						)
									self.assertEqual(arr.type   ,     pa.intaa()						)




						def  _snake_case					(	self						:   Dict						)      ->List[str]:






									"""simple docstring"""






									a__ :Tuple						  =    pa.array(TypedSequence(["foo", "bar"]   ,     try_type=Value("int64"						)						)						)
									self.assertEqual(arr.type   ,     pa.string()						)




						def  _snake_case					(	self						:   int						)      ->str:






									"""simple docstring"""






									a__ :List[Any]						  =    pa.array(TypedSequence([[[1, 2, 3]]]   ,     type=ArrayaD((1, 3)   ,     "int64"						)						)						)
									self.assertEqual(arr.type   ,     ArrayaDExtensionType((1, 3)   ,     "int64"						)						)




						def  _snake_case					(	self						:   Optional[Any]						)      ->int:






									"""simple docstring"""






									with self.assertRaises((TypeError, pa.lib.ArrowInvalid)						):
												a__ :List[Any]						  =    pa.array(TypedSequence(["foo", "bar"]   ,     type=ArrayaD((1, 3)   ,     "int64"						)						)						)




						def  _snake_case					(	self						:   Tuple						)      ->Tuple:






									"""simple docstring"""






									a__ :Any						  =    pa.array(TypedSequence([[[1, 2, 3]]]   ,     try_type=ArrayaD((1, 3)   ,     "int64"						)						)						)
									self.assertEqual(arr.type   ,     ArrayaDExtensionType((1, 3)   ,     "int64"						)						)




						def  _snake_case					(	self						:   Optional[Any]						)      ->Any:






									"""simple docstring"""






									a__ :Any						  =    pa.array(TypedSequence(["foo", "bar"]   ,     try_type=ArrayaD((1, 3)   ,     "int64"						)						)						)
									self.assertEqual(arr.type   ,     pa.string()						)






						@require_pil
						def  _snake_case					(	self						:   Dict						)      ->Union[str, Any]:






									"""simple docstring"""






									import PIL.Image

									a__ :List[Any]						  =    PIL.Image.fromarray(np.arange(10   ,     dtype=np.uinta						).reshape(2   ,     5						)						)
									with patch(
									    "datasets.arrow_writer.cast_to_python_objects"   ,     side_effect=__A						) as mock_cast_to_python_objects:
												a__ :Optional[Any]						  =    pa.array(TypedSequence([{"path": None, "bytes": B"image_bytes"}, pil_image]   ,     type=Image()						)						)
												a__  ,  a__ :Tuple						  =    mock_cast_to_python_objects.call_args_list[-1]
												self.assertIn("optimize_list_casting"   ,     __A						)
												self.assertFalse(kwargs["optimize_list_casting"]						)






def 				lowerCamelCase__	(      a	:   List[Any]	,  a	:   int				)    ->	Any:





			"""simple docstring"""
			a__ :List[str]						  =    pa.BufferReader(a				) if isinstance(a	,  pa.Buffer				) else pa.memory_map(a				)
			a__ :int						  =    pa.ipc.open_stream(a				)
			a__ :pa.Table						  =    f.read_all()
			assert len(pa_table.to_batches()				) == expected_num_chunks
			assert pa_table.to_pydict() == {"col_1": ["foo", "bar"], "col_2": [1, 2]}
			del pa_table


@pytest.mark.parametrize("writer_batch_size"	,  [None, 1, 10]				)
@pytest.mark.parametrize(
    "fields"	,  [None, {"col_1": pa.string(), "col_2": pa.intaa()}, {"col_1": pa.string(), "col_2": pa.intaa()}]				)
def 				lowerCamelCase__	(      a	:   str	,  a	:   List[Any]				)    ->	Tuple:





			"""simple docstring"""
			a__ :Any						  =    pa.BufferOutputStream()
			a__ :Any						  =    pa.schema(a				) if fields else None
			with ArrowWriter(stream=a	,  schema=a	,  writer_batch_size=a				) as writer:
						writer.write({"col_1": "foo", "col_2": 1}				)
						writer.write({"col_1": "bar", "col_2": 2}				)
						a__  ,  a__ :str						  =    writer.finalize()
			assert num_examples == 2
			assert num_bytes > 0
			if not fields:
						a__ :Union[str, Any]						  =    {"col_1": pa.string(), "col_2": pa.intaa()}
			assert writer._schema == pa.schema(a	,  metadata=writer._schema.metadata				)
			_check_output(output.getvalue()	,  expected_num_chunks=num_examples if writer_batch_size == 1 else 1				)


def 				lowerCamelCase__	(      )    ->	str:





			"""simple docstring"""
			a__ :Optional[Any]						  =    pa.BufferOutputStream()
			a__ :Any						  =    Features({"labels": ClassLabel(names=["neg", "pos"]				)}				)
			with ArrowWriter(stream=a	,  features=a				) as writer:
						writer.write({"labels": 0}				)
						writer.write({"labels": 1}				)
						a__  ,  a__ :str						  =    writer.finalize()
			assert num_examples == 2
			assert num_bytes > 0
			assert writer._schema == features.arrow_schema
			assert writer._schema.metadata == features.arrow_schema.metadata
			a__ :int						  =    pa.BufferReader(output.getvalue()				)
			a__ :Optional[Any]						  =    pa.ipc.open_stream(a				)
			a__ :pa.Table						  =    f.read_all()
			a__ :Tuple						  =    pa_table.schema
			assert pa_table.num_rows == 2
			assert schema == features.arrow_schema
			assert schema.metadata == features.arrow_schema.metadata
			assert features == Features.from_arrow_schema(a				)


@pytest.mark.parametrize("writer_batch_size"	,  [None, 1, 10]				)
def 				lowerCamelCase__	(      a	:   Dict				)    ->	Optional[int]:





			"""simple docstring"""
			a__ :Union[str, Any]						  =    pa.BufferOutputStream()
			with ArrowWriter(
			    stream=a	,  writer_batch_size=a	,  hash_salt="split_name"	,  check_duplicates=a	,  ) as writer:
						with pytest.raises(a				):
									writer.write({"col_1": "foo", "col_2": 1}	,  key=[1, 2]				)
									a__  ,  a__ :Any						  =    writer.finalize()


@pytest.mark.parametrize("writer_batch_size"	,  [None, 2, 10]				)
def 				lowerCamelCase__	(      a	:   Dict				)    ->	List[Any]:





			"""simple docstring"""
			a__ :int						  =    pa.BufferOutputStream()
			with ArrowWriter(
			    stream=a	,  writer_batch_size=a	,  hash_salt="split_name"	,  check_duplicates=a	,  ) as writer:
						with pytest.raises(a				):
									writer.write({"col_1": "foo", "col_2": 1}	,  key=10				)
									writer.write({"col_1": "bar", "col_2": 2}	,  key=10				)
									a__  ,  a__ :List[Any]						  =    writer.finalize()


@pytest.mark.parametrize("writer_batch_size"	,  [None, 2, 10]				)
def 				lowerCamelCase__	(      a	:   int				)    ->	Dict:





			"""simple docstring"""
			a__ :Dict						  =    pa.BufferOutputStream()
			with ArrowWriter(
			    stream=a	,  writer_batch_size=a	,  hash_salt="split_name"	,  check_duplicates=a	,  ) as writer:
						writer.write({"col_1": "foo", "col_2": 1}	,  key=1				)
						writer.write({"col_1": "bar", "col_2": 2}	,  key=2				)
						a__  ,  a__ :Optional[Any]						  =    writer.finalize()
			assert num_examples == 2
			assert num_bytes > 0
			_check_output(output.getvalue()	,  expected_num_chunks=num_examples if writer_batch_size == 1 else 1				)


@pytest.mark.parametrize("writer_batch_size"	,  [None, 1, 10]				)
@pytest.mark.parametrize(
    "fields"	,  [None, {"col_1": pa.string(), "col_2": pa.intaa()}, {"col_1": pa.string(), "col_2": pa.intaa()}]				)
def 				lowerCamelCase__	(      a	:   Tuple	,  a	:   int				)    ->	List[str]:





			"""simple docstring"""
			a__ :str						  =    pa.BufferOutputStream()
			a__ :Any						  =    pa.schema(a				) if fields else None
			with ArrowWriter(stream=a	,  schema=a	,  writer_batch_size=a				) as writer:
						writer.write_batch({"col_1": ["foo", "bar"], "col_2": [1, 2]}				)
						writer.write_batch({"col_1": [], "col_2": []}				)
						a__  ,  a__ :Tuple						  =    writer.finalize()
			assert num_examples == 2
			assert num_bytes > 0
			if not fields:
						a__ :List[str]						  =    {"col_1": pa.string(), "col_2": pa.intaa()}
			assert writer._schema == pa.schema(a	,  metadata=writer._schema.metadata				)
			_check_output(output.getvalue()	,  expected_num_chunks=num_examples if writer_batch_size == 1 else 1				)


@pytest.mark.parametrize("writer_batch_size"	,  [None, 1, 10]				)
@pytest.mark.parametrize(
    "fields"	,  [None, {"col_1": pa.string(), "col_2": pa.intaa()}, {"col_1": pa.string(), "col_2": pa.intaa()}]				)
def 				lowerCamelCase__	(      a	:   List[str]	,  a	:   str				)    ->	List[str]:





			"""simple docstring"""
			a__ :str						  =    pa.BufferOutputStream()
			a__ :str						  =    pa.schema(a				) if fields else None
			with ArrowWriter(stream=a	,  schema=a	,  writer_batch_size=a				) as writer:
						writer.write_table(pa.Table.from_pydict({"col_1": ["foo", "bar"], "col_2": [1, 2]}				)				)
						a__  ,  a__ :Union[str, Any]						  =    writer.finalize()
			assert num_examples == 2
			assert num_bytes > 0
			if not fields:
						a__ :Optional[int]						  =    {"col_1": pa.string(), "col_2": pa.intaa()}
			assert writer._schema == pa.schema(a	,  metadata=writer._schema.metadata				)
			_check_output(output.getvalue()	,  expected_num_chunks=num_examples if writer_batch_size == 1 else 1				)


@pytest.mark.parametrize("writer_batch_size"	,  [None, 1, 10]				)
@pytest.mark.parametrize(
    "fields"	,  [None, {"col_1": pa.string(), "col_2": pa.intaa()}, {"col_1": pa.string(), "col_2": pa.intaa()}]				)
def 				lowerCamelCase__	(      a	:   int	,  a	:   Tuple				)    ->	List[Any]:





			"""simple docstring"""
			a__ :List[str]						  =    pa.BufferOutputStream()
			a__ :Dict						  =    pa.schema(a				) if fields else None
			with ArrowWriter(stream=a	,  schema=a	,  writer_batch_size=a				) as writer:
						writer.write_row(pa.Table.from_pydict({"col_1": ["foo"], "col_2": [1]}				)				)
						writer.write_row(pa.Table.from_pydict({"col_1": ["bar"], "col_2": [2]}				)				)
						a__  ,  a__ :Tuple						  =    writer.finalize()
			assert num_examples == 2
			assert num_bytes > 0
			if not fields:
						a__ :Any						  =    {"col_1": pa.string(), "col_2": pa.intaa()}
			assert writer._schema == pa.schema(a	,  metadata=writer._schema.metadata				)
			_check_output(output.getvalue()	,  expected_num_chunks=num_examples if writer_batch_size == 1 else 1				)


def 				lowerCamelCase__	(      )    ->	Optional[Any]:





			"""simple docstring"""
			with tempfile.TemporaryDirectory() as tmp_dir:
						a__ :Dict						  =    {"col_1": pa.string(), "col_2": pa.intaa()}
						a__ :Any						  =    os.path.join(a	,  "test.arrow"				)
						with ArrowWriter(path=a	,  schema=pa.schema(a				)				) as writer:
									writer.write_batch({"col_1": ["foo", "bar"], "col_2": [1, 2]}				)
									a__  ,  a__ :Optional[Any]						  =    writer.finalize()
						assert num_examples == 2
						assert num_bytes > 0
						assert writer._schema == pa.schema(a	,  metadata=writer._schema.metadata				)
						_check_output(a	,  1				)


def 				lowerCamelCase__	(      a	:   Optional[Any]				)    ->	Tuple:





			"""simple docstring"""
			if pa.types.is_list(a				):
						return get_base_dtype(arr_type.value_type				)
			else:
						return arr_type


def 				lowerCamelCase__	(      a	:   List[Any]	,  a	:   Tuple				)    ->	Optional[int]:





			"""simple docstring"""
			if isinstance(lst[0]	,  a				):
						change_first_primitive_element_in_list(lst[0]	,  a				)
			else:
						a__ :List[str]						  =    value


@pytest.mark.parametrize("optimized_int_type, expected_dtype"	,  [(None, pa.intaa()), (Value("int32"				), pa.intaa())]				)
@pytest.mark.parametrize("sequence"	,  [[1, 2, 3], [[1, 2, 3]], [[[1, 2, 3]]]]				)
def 				lowerCamelCase__	(      a	:   Optional[Any]	,  a	:   str	,  a	:   Tuple				)    ->	Tuple:





			"""simple docstring"""
			a__ :Dict						  =    pa.array(TypedSequence(a	,  optimized_int_type=a				)				)
			assert get_base_dtype(arr.type				) == expected_dtype


@pytest.mark.parametrize(
    "col, expected_dtype"	,  [
        ("attention_mask", pa.inta()),
        ("special_tokens_mask", pa.inta()),
        ("token_type_ids", pa.inta()),
        ("input_ids", pa.intaa()),
        ("other", pa.intaa()),
    ]	,  )
@pytest.mark.parametrize("sequence"	,  [[1, 2, 3], [[1, 2, 3]], [[[1, 2, 3]]]]				)
def 				lowerCamelCase__	(      a	:   Any	,  a	:   Optional[Any]	,  a	:   Dict				)    ->	Dict:





			"""simple docstring"""
			# in range
			a__ :int						  =    pa.array(OptimizedTypedSequence(a	,  col=a				)				)
			assert get_base_dtype(arr.type				) == expected_dtype

			# not in range
			if col != "other":
						# avoids errors due to in-place modifications
						a__ :Optional[Any]						  =    copy.deepcopy(a				)
						a__ :Optional[int]						  =    np.iinfo(expected_dtype.to_pandas_dtype()				).max + 1
						change_first_primitive_element_in_list(a	,  a				)
						a__ :Optional[Any]						  =    pa.array(OptimizedTypedSequence(a	,  col=a				)				)
						assert get_base_dtype(arr.type				) == pa.intaa()


@pytest.mark.parametrize("raise_exception"	,  [False, True]				)
def 				lowerCamelCase__	(      a	:   Tuple	,  a	:   Tuple				)    ->	str:





			"""simple docstring"""
			a__ :List[Any]						  =    str(tmp_path / "dataset-train.arrow"				)
			try:
						with ArrowWriter(path=a				) as writer:
									if raise_exception:
												raise pa.lib.ArrowInvalid()
									else:
												writer.stream.close()
			except pa.lib.ArrowInvalid:
						pass
			finally:
						assert writer.stream.closed


def 				lowerCamelCase__	(      a	:   Tuple				)    ->	Optional[int]:





			"""simple docstring"""
			a__ :List[str]						  =    "mock://dataset-train.arrow"
			with ArrowWriter(path=a	,  storage_options=mockfs.storage_options				) as writer:
						assert isinstance(writer._fs	,  type(a				)				)
						assert writer._fs.storage_options == mockfs.storage_options
						writer.write({"col_1": "foo", "col_2": 1}				)
						writer.write({"col_1": "bar", "col_2": 2}				)
						a__  ,  a__ :Optional[int]						  =    writer.finalize()
			assert num_examples == 2
			assert num_bytes > 0
			assert mockfs.exists(a				)


def 				lowerCamelCase__	(      )    ->	Any:





			"""simple docstring"""
			a__ :List[str]						  =    pa.BufferOutputStream()
			with ParquetWriter(stream=a				) as writer:
						writer.write({"col_1": "foo", "col_2": 1}				)
						writer.write({"col_1": "bar", "col_2": 2}				)
						a__  ,  a__ :Optional[int]						  =    writer.finalize()
			assert num_examples == 2
			assert num_bytes > 0
			a__ :Optional[int]						  =    pa.BufferReader(output.getvalue()				)
			a__ :pa.Table						  =    pq.read_table(a				)
			assert pa_table.to_pydict() == {"col_1": ["foo", "bar"], "col_2": [1, 2]}


@require_pil
@pytest.mark.parametrize("embed_local_files"	,  [False, True]				)
def 				lowerCamelCase__	(      a	:   Any	,  a	:   Tuple				)    ->	int:





			"""simple docstring"""
			import PIL.Image

			a__ :Optional[Any]						  =    str(tmp_path / "test_image_rgb.jpg"				)
			PIL.Image.fromarray(np.zeros((5, 5)	,  dtype=np.uinta				)				).save(a	,  format="png"				)
			a__ :Any						  =    pa.BufferOutputStream()
			with ParquetWriter(
			    stream=a	,  features=Features({"image": Image()}				)	,  embed_local_files=a				) as writer:
						writer.write({"image": image_path}				)
						writer.finalize()
			a__ :Any						  =    pa.BufferReader(output.getvalue()				)
			a__ :pa.Table						  =    pq.read_table(a				)
			a__ :List[str]						  =    pa_table.to_pydict()
			if embed_local_files:
						assert isinstance(out["image"][0]["path"]	,  a				)
						with open(a	,  "rb"				) as f:
									assert out["image"][0]["bytes"] == f.read()
			else:
						assert out["image"][0]["path"] == image_path
						assert out["image"][0]["bytes"] is None







def 				lowerCamelCase__	(      )    ->	Union[str, Any]:





			"""simple docstring"""
			a__ :Tuple						  =    pa.schema([pa.field("col_1"	,  pa.string()	,  nullable=a				)]				)
			a__ :Optional[Any]						  =    pa.BufferOutputStream()
			with ArrowWriter(stream=a				) as writer:
						writer._build_writer(inferred_schema=a				)
						assert writer._schema == pa.schema([pa.field("col_1"	,  pa.string()				)]				)






import functools
import operator

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


snake_case__			 =						logging.get_logger(__name__)

snake_case__			 =						{
    '''asapp/sew-tiny-100k''': '''https://huggingface.co/asapp/sew-tiny-100k/resolve/main/config.json''',
    # See all SEW models at https://huggingface.co/models?filter=sew
}


class 					lowerCAmelCase_ (       _a):
						lowerCamelCase_         =     'sew'




						def __init__(	self						:   Any   ,     __A						:   str=32   ,     __A						:   Dict=768   ,     __A						:   int=12   ,     __A						:   Dict=12   ,     __A						:   Dict=3072   ,     __A						:   int=2   ,     __A						:   Union[str, Any]="gelu"   ,     __A						:   Union[str, Any]=0.1   ,     __A						:   Optional[Any]=0.1   ,     __A						:   Union[str, Any]=0.1   ,     __A						:   str=0.0   ,     __A						:   Union[str, Any]=0.1   ,     __A						:   Optional[Any]=0.1   ,     __A						:   Tuple=0.02   ,     __A						:   Any=1E-5   ,     __A						:   Optional[Any]="group"   ,     __A						:   str="gelu"   ,     __A						:   Dict=(64, 128, 128, 128, 128, 256, 256, 256, 256, 512, 512, 512, 512)   ,     __A						:   Tuple=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1)   ,     __A						:   int=(10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1)   ,     __A						:   List[str]=False   ,     __A						:   Tuple=128   ,     __A						:   Tuple=16   ,     __A						:   Optional[int]=True   ,     __A						:   Union[str, Any]=0.05   ,     __A						:   List[str]=10   ,     __A						:   Optional[int]=2   ,     __A						:   List[Any]=0.0   ,     __A						:   Optional[Any]=10   ,     __A						:   Tuple=0   ,     __A						:   Tuple="mean"   ,     __A						:   Any=False   ,     __A						:   str=False   ,     __A						:   Dict=256   ,     __A						:   Union[str, Any]=0   ,     __A						:   Optional[int]=1   ,     __A						:   Optional[Any]=2   ,     **__A						:   Tuple   ,     )      ->Tuple:






									"""simple docstring"""






									super().__init__(**__A   ,     pad_token_id=__A   ,     bos_token_id=__A   ,     eos_token_id=__A						)
									a__ :List[Any]						  =    hidden_size
									a__ :List[Any]						  =    feat_extract_norm
									a__ :List[str]						  =    feat_extract_activation
									a__ :Any						  =    list(__A						)
									a__ :Dict						  =    list(__A						)
									a__ :Optional[int]						  =    list(__A						)
									a__ :Any						  =    conv_bias
									a__ :List[str]						  =    num_conv_pos_embeddings
									a__ :str						  =    num_conv_pos_embedding_groups
									a__ :Optional[int]						  =    len(self.conv_dim						)
									a__ :List[Any]						  =    num_hidden_layers
									a__ :str						  =    intermediate_size
									a__ :Dict						  =    squeeze_factor
									a__ :List[Any]						  =    hidden_act
									a__ :Optional[Any]						  =    num_attention_heads
									a__ :Tuple						  =    hidden_dropout
									a__ :Tuple						  =    attention_dropout
									a__ :List[Any]						  =    activation_dropout
									a__ :str						  =    feat_proj_dropout
									a__ :Any						  =    final_dropout
									a__ :Dict						  =    layerdrop
									a__ :List[str]						  =    layer_norm_eps
									a__ :Tuple						  =    initializer_range
									a__ :Dict						  =    vocab_size

									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)`,"
												    F'''but is `len(config.conv_dim) = {len(self.conv_dim						)}`, `len(config.conv_stride)'''
												    F'''= {len(self.conv_stride						)}`, `len(config.conv_kernel) = {len(self.conv_kernel						)}`.'''						)

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

									# ctc loss
									a__ :Dict						  =    ctc_loss_reduction
									a__ :Any						  =    ctc_zero_infinity

									# sequence classification
									a__ :Optional[int]						  =    use_weighted_layer_sum
									a__ :Tuple						  =    classifier_proj_size






						@property
						def  _snake_case					(	self						:   Dict						)      ->Union[str, Any]:






									"""simple docstring"""






									return functools.reduce(operator.mul   ,     self.conv_stride   ,     1						)


