



"""simple docstring"""






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


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

__snake_case							:   str      =    {
    '''google/pegasus-large''': '''https://huggingface.co/google/pegasus-large/resolve/main/config.json''',
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}



class 			A__   (  lowerCAmelCase_							):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE          =	"""pegasus"""
	SCREAMING_SNAKE_CASE          =	["""past_key_values"""]
	SCREAMING_SNAKE_CASE          =	{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}

	def __init__(     self:		Optional[Any]       ,			_SCREAMING_SNAKE_CASE:		Optional[Any]=5_0265       ,			_SCREAMING_SNAKE_CASE:		str=1024       ,			_SCREAMING_SNAKE_CASE:		Any=12       ,			_SCREAMING_SNAKE_CASE:		Optional[int]=4096       ,			_SCREAMING_SNAKE_CASE:		List[Any]=16       ,			_SCREAMING_SNAKE_CASE:		Tuple=12       ,			_SCREAMING_SNAKE_CASE:		Optional[int]=4096       ,			_SCREAMING_SNAKE_CASE:		Any=16       ,			_SCREAMING_SNAKE_CASE:		Tuple=0.0       ,			_SCREAMING_SNAKE_CASE:		List[Any]=0.0       ,			_SCREAMING_SNAKE_CASE:		Optional[int]=True       ,			_SCREAMING_SNAKE_CASE:		Optional[Any]=True       ,			_SCREAMING_SNAKE_CASE:		List[Any]="gelu"       ,			_SCREAMING_SNAKE_CASE:		Dict=1024       ,			_SCREAMING_SNAKE_CASE:		str=0.1       ,			_SCREAMING_SNAKE_CASE:		Tuple=0.0       ,			_SCREAMING_SNAKE_CASE:		Optional[int]=0.0       ,			_SCREAMING_SNAKE_CASE:		List[Any]=0.02       ,			_SCREAMING_SNAKE_CASE:		Optional[int]=0       ,			_SCREAMING_SNAKE_CASE:		str=False       ,			_SCREAMING_SNAKE_CASE:		Dict=0       ,			_SCREAMING_SNAKE_CASE:		Dict=1       ,			_SCREAMING_SNAKE_CASE:		List[str]=1       ,			**_SCREAMING_SNAKE_CASE:		str       ,			)				->       Tuple:

				"""simple docstring"""

				__lowerCAmelCase      :  Optional[int]												=       vocab_size
				__lowerCAmelCase      :  str												=       max_position_embeddings
				__lowerCAmelCase      :  List[str]												=       d_model
				__lowerCAmelCase      :  Optional[Any]												=       encoder_ffn_dim
				__lowerCAmelCase      :  List[str]												=       encoder_layers
				__lowerCAmelCase      :  str												=       encoder_attention_heads
				__lowerCAmelCase      :  List[Any]												=       decoder_ffn_dim
				__lowerCAmelCase      :  Tuple												=       decoder_layers
				__lowerCAmelCase      :  str												=       decoder_attention_heads
				__lowerCAmelCase      :  List[str]												=       dropout
				__lowerCAmelCase      :  List[Any]												=       attention_dropout
				__lowerCAmelCase      :  Tuple												=       activation_dropout
				__lowerCAmelCase      :  List[str]												=       activation_function
				__lowerCAmelCase      :  List[Any]												=       init_std
				__lowerCAmelCase      :  Union[str, Any]												=       encoder_layerdrop
				__lowerCAmelCase      :  Union[str, Any]												=       decoder_layerdrop
				__lowerCAmelCase      :  Optional[int]												=       use_cache
				__lowerCAmelCase      :  Optional[Any]												=       encoder_layers
				__lowerCAmelCase      :  Optional[Any]												=       scale_embedding  # scale factor will be sqrt(d_model) if True
				super().__init__(
				    pad_token_id=snake_case_       ,			eos_token_id=snake_case_       ,			is_encoder_decoder=snake_case_       ,			decoder_start_token_id=snake_case_       ,			forced_eos_token_id=snake_case_       ,			**snake_case_       ,			)

	@property
	def 							_SCREAMING_SNAKE_CASE   (     self:		List[Any])				->       Optional[Any]:

				"""simple docstring"""

				return self.encoder_attention_heads







	@property
	def 							_SCREAMING_SNAKE_CASE   (     self:		Any)				->       Tuple:

				"""simple docstring"""

				return self.d_model






'''simple docstring'''




import os
from datetime import datetime as dt

from github import Github


__SCREAMING_SNAKE_CASE     :str       =				[
    '''good first issue''',
    '''feature request''',
    '''wip''',
]
def 	UpperCAmelCase_							(					)		->       Optional[Any]:


     '''simple docstring'''



     _UpperCAmelCase     							=   Github(os.environ["GITHUB_TOKEN"]       )
     _UpperCAmelCase     							=   g.get_repo("huggingface/accelerate"       )
     _UpperCAmelCase     							=   repo.get_issues(state="open"       )

     for issue in open_issues:
          _UpperCAmelCase     							=   sorted([comment for comment in issue.get_comments()]			,     key=lambda __lowercase       : i.created_at			,     reverse=__lowercase       )
          _UpperCAmelCase     							=   comments[0] if len(__lowercase       ) > 0 else None
          _UpperCAmelCase     							=   dt.utcnow()
          _UpperCAmelCase     							=   (current_time - issue.updated_at).days
          _UpperCAmelCase     							=   (current_time - issue.created_at).days
          if (
              last_comment is not None
              and last_comment.user.login == "github-actions[bot]"
              and days_since_updated > 7
              and days_since_creation >= 30
              and not any(label.name.lower() in LABELS_TO_EXEMPT for label in issue.get_labels()       )
          ):
               # Close issue since it has been 7 days of inactivity since bot mention.
               issue.edit(state="closed"       )
          elif (
              days_since_updated > 23
              and days_since_creation >= 30
              and not any(label.name.lower() in LABELS_TO_EXEMPT for label in issue.get_labels()       )
          ):
               # Add stale comment
               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/accelerate/blob/main/CONTRIBUTING.md) "
                   "are likely to be ignored."       )


if __name__ == "__main__":
  main()




