"""simple docstring"""


import functools
import operator

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


__UpperCamelCase									=			logging.get_logger(__name__)

__UpperCamelCase									=			{
    '''facebook/wav2vec2-base-960h''': '''https://huggingface.co/facebook/wav2vec2-base-960h/resolve/main/config.json''',
    # See all Wav2Vec2 models at https://huggingface.co/models?filter=wav2vec2
}




class  UpperCamelCase					(				lowerCAmelCase__   ):
       SCREAMING_SNAKE_CASE_			=      "wav2vec2"







       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__="sum",							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__=False,							lowerCAmelCase__=3,							lowerCAmelCase__=2,							lowerCAmelCase__=3,							lowerCAmelCase__=None,							lowerCAmelCase__=None,							**lowerCAmelCase__,							)      ->      List[Any]:
            super().__init__(**lowerCAmelCase__,							pad_token_id=lowerCAmelCase__,							bos_token_id=lowerCAmelCase__,							eos_token_id=lowerCAmelCase__)
            snake_case_					       =					hidden_size
            snake_case_					       =					feat_extract_norm
            snake_case_					       =					feat_extract_activation
            snake_case_					       =					list(lowerCAmelCase__)
            snake_case_					       =					list(lowerCAmelCase__)
            snake_case_					       =					list(lowerCAmelCase__)
            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_					       =					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

            # adapter
            snake_case_					       =					add_adapter
            snake_case_					       =					adapter_kernel_size
            snake_case_					       =					adapter_stride
            snake_case_					       =					num_adapter_layers
            snake_case_					       =					output_hidden_size or hidden_size
            snake_case_					       =					adapter_attn_dim

            # 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(lowerCAmelCase__)
            snake_case_					       =					list(lowerCAmelCase__)
            snake_case_					       =					list(lowerCAmelCase__)
            snake_case_					       =					xvector_output_dim







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









# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


lowerCamelCase	:							Optional[Any]				=subprocess.check_output('''git merge-base main HEAD'''.split()).decode('''utf-8''')
lowerCamelCase	:							str				=subprocess.check_output(F"""git diff --name-only {fork_point_sha}""".split()).decode('''utf-8''').split()

lowerCamelCase	:							List[Any]				='''|'''.join(sys.argv[1:])
lowerCamelCase	:							str				=re.compile(RF"""^({joined_dirs}).*?\.py$""")

lowerCamelCase	:							Optional[int]				=[x for x in modified_files if regex.match(x)]
print(''' '''.join(relevant_modified_files), end='''''')