


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


UpperCamelCase						:				Any             =      logging.get_logger(__name__)

UpperCamelCase						:				List[str]             =      {
    'facebook/s2t-small-librispeech-asr': (
        'https://huggingface.co/facebook/s2t-small-librispeech-asr/resolve/main/config.json'
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech_to_text
}



class 			lowerCamelCase__						(   a__			):
						lowerCAmelCase       =     """speech_to_text"""
						lowerCAmelCase       =     ["""past_key_values"""]
						lowerCAmelCase       =     {"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}







						def __init__(							self   :    Optional[int]			,			_lowercase   :    Tuple=10_000			,			_lowercase   :    Any=12			,			_lowercase   :    Union[str, Any]=2_048			,			_lowercase   :    Optional[Any]=4			,			_lowercase   :    Tuple=6			,			_lowercase   :    Tuple=2_048			,			_lowercase   :    Tuple=4			,			_lowercase   :    Any=0.0			,			_lowercase   :    Any=0.0			,			_lowercase   :    List[str]=True			,			_lowercase   :    Optional[Any]=True			,			_lowercase   :    List[str]="relu"			,			_lowercase   :    int=256			,			_lowercase   :    Optional[Any]=0.1			,			_lowercase   :    int=0.0			,			_lowercase   :    Union[str, Any]=0.0			,			_lowercase   :    int=0.0_2			,			_lowercase   :    Optional[int]=2			,			_lowercase   :    int=True			,			_lowercase   :    Optional[int]=1			,			_lowercase   :    Any=0			,			_lowercase   :    Dict=2			,			_lowercase   :    Tuple=6_000			,			_lowercase   :    Optional[Any]=1_024			,			_lowercase   :    str=2			,			_lowercase   :    List[Any]=(5, 5)			,			_lowercase   :    Optional[int]=1_024			,			_lowercase   :    Union[str, Any]=80			,			_lowercase   :    int=1			,			**_lowercase   :    str			,			):
								A					       = vocab_size
								A					       = d_model
								A					       = encoder_ffn_dim
								A					       = encoder_layers
								A					       = encoder_attention_heads
								A					       = decoder_ffn_dim
								A					       = decoder_layers
								A					       = decoder_attention_heads
								A					       = dropout
								A					       = attention_dropout
								A					       = activation_dropout
								A					       = activation_function
								A					       = init_std
								A					       = encoder_layerdrop
								A					       = decoder_layerdrop
								A					       = use_cache
								A					       = encoder_layers
								A					       = scale_embedding  # scale factor will be sqrt(d_model) if True
								A					       = max_source_positions
								A					       = max_target_positions
								A					       = num_conv_layers
								A					       = list(lowercase__		)
								A					       = conv_channels
								A					       = input_feat_per_channel
								A					       = input_channels

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

								super().__init__(
								    pad_token_id=lowercase__			,			bos_token_id=lowercase__			,			eos_token_id=lowercase__			,			is_encoder_decoder=lowercase__			,			decoder_start_token_id=lowercase__			,			**lowercase__			,			)









"""simple docstring"""


from datetime import datetime as dt
import os

from github import Github


UpperCamelCase						:				Union[str, Any]             =      [
    "good first issue",
    "good second issue",
    "good difficult issue",
    "feature request",
    "new model",
    "wip",
]







def  __snake_case       (   )      ->		int:







		"""simple docstring"""





		A					       = Github(os.environ['GITHUB_TOKEN']	)
		A					       = g.get_repo('huggingface/transformers'	)
		A					       = repo.get_issues(state='open'	)

		for issue in open_issues:
				A					       = sorted([comment for comment in issue.get_comments()] ,			key=lambda UpperCamelCase__	: i.created_at ,			reverse=UpperCamelCase__	)
				A					       = comments[0] if len(UpperCamelCase__	) > 0 else None
				if (
				    last_comment is not None
				    and last_comment.user.login == "github-actions[bot]"
				    and (dt.utcnow() - issue.updated_at).days > 7
				    and (dt.utcnow() - issue.created_at).days >= 30
				    and not any(label.name.lower() in LABELS_TO_EXEMPT for label in issue.get_labels()	)
				):
						# print(f"Would close issue {issue.number} since it has been 7 days of inactivity since bot mention.")
						issue.edit(state='closed'	)
				elif (
				    (dt.utcnow() - issue.updated_at).days > 23
				    and (dt.utcnow() - issue.created_at).days >= 30
				    and not any(label.name.lower() in LABELS_TO_EXEMPT for label in issue.get_labels()	)
				):
						# print(f"Would add stale comment to {issue.number}")
						issue.create_comment(
						    'This issue has been automatically marked as stale because it has not had '
						    'recent activity. If you think this still needs to be addressed '
						    'please comment on this thread.\n\nPlease note that issues that do not follow the '
						    '[contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) '
						    'are likely to be ignored.'	)


if __name__ == "__main__":
	main()





