

'''simple docstring'''

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


A_      =							logging.get_logger(__name__)

A_      =							{
    "uw-madison/yoso-4096": "https://huggingface.co/uw-madison/yoso-4096/resolve/main/config.json",
    # See all YOSO models at https://huggingface.co/models?filter=yoso
}





class 							_snake_case	(    _a  ):
   _A    :       Tuple      				=   '''yoso'''
   def __init__(	self     : List[Any]       ,SCREAMING_SNAKE_CASE__     : int=50_265       ,SCREAMING_SNAKE_CASE__     : int=768       ,SCREAMING_SNAKE_CASE__     : Optional[int]=12       ,SCREAMING_SNAKE_CASE__     : Dict=12       ,SCREAMING_SNAKE_CASE__     : Dict=3_072       ,SCREAMING_SNAKE_CASE__     : List[Any]="gelu"       ,SCREAMING_SNAKE_CASE__     : Any=0.1       ,SCREAMING_SNAKE_CASE__     : Optional[Any]=0.1       ,SCREAMING_SNAKE_CASE__     : Tuple=4_096       ,SCREAMING_SNAKE_CASE__     : List[Any]=1       ,SCREAMING_SNAKE_CASE__     : int=0.02       ,SCREAMING_SNAKE_CASE__     : Union[str, Any]=1e-12       ,SCREAMING_SNAKE_CASE__     : str="absolute"       ,SCREAMING_SNAKE_CASE__     : Tuple=True       ,SCREAMING_SNAKE_CASE__     : int=9       ,SCREAMING_SNAKE_CASE__     : int=64       ,SCREAMING_SNAKE_CASE__     : str=None       ,SCREAMING_SNAKE_CASE__     : int=True       ,SCREAMING_SNAKE_CASE__     : Tuple=True       ,SCREAMING_SNAKE_CASE__     : Dict=1       ,SCREAMING_SNAKE_CASE__     : List[str]=0       ,SCREAMING_SNAKE_CASE__     : Any=2       ,**SCREAMING_SNAKE_CASE__     : int       ,):
     super().__init__(pad_token_id=SCREAMING_SNAKE_CASE__       ,bos_token_id=SCREAMING_SNAKE_CASE__       ,eos_token_id=SCREAMING_SNAKE_CASE__       ,**SCREAMING_SNAKE_CASE__							)

     SCREAMING_SNAKE_CASE:Optional[Any]   =   vocab_size
     SCREAMING_SNAKE_CASE:List[Any]   =   max_position_embeddings
     SCREAMING_SNAKE_CASE:Dict   =   hidden_size
     SCREAMING_SNAKE_CASE:Any   =   num_hidden_layers
     SCREAMING_SNAKE_CASE:int   =   num_attention_heads
     SCREAMING_SNAKE_CASE:Any   =   intermediate_size
     SCREAMING_SNAKE_CASE:Any   =   hidden_act
     SCREAMING_SNAKE_CASE:Any   =   hidden_dropout_prob
     SCREAMING_SNAKE_CASE:Tuple   =   attention_probs_dropout_prob
     SCREAMING_SNAKE_CASE:Optional[int]   =   initializer_range
     SCREAMING_SNAKE_CASE:Tuple   =   type_vocab_size
     SCREAMING_SNAKE_CASE:Tuple   =   layer_norm_eps
     SCREAMING_SNAKE_CASE:List[Any]   =   position_embedding_type
     SCREAMING_SNAKE_CASE:Dict   =   use_expectation
     SCREAMING_SNAKE_CASE:Dict   =   hash_code_len
     SCREAMING_SNAKE_CASE:Dict   =   num_hash
     SCREAMING_SNAKE_CASE:str   =   conv_window
     SCREAMING_SNAKE_CASE:List[Any]   =   use_fast_hash
     SCREAMING_SNAKE_CASE:str   =   lsh_backward









'''simple docstring'''

import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils





class 							_snake_case	(    unittest.TestCase  ):
   @patch("diffusers.utils.hub_utils.get_full_repo_name"							)
   def       __UpperCamelCase  (	self     : List[str]       ,SCREAMING_SNAKE_CASE__     : Mock							):
     SCREAMING_SNAKE_CASE:Optional[Any]   =   "full_repo_name"
     with TemporaryDirectory() as tmpdir:
       # Dummy args values
       SCREAMING_SNAKE_CASE:int   =   Mock()
       SCREAMING_SNAKE_CASE:int   =   tmpdir
       SCREAMING_SNAKE_CASE:Optional[Any]   =   0
       SCREAMING_SNAKE_CASE:Union[str, Any]   =   "hub_token"
       SCREAMING_SNAKE_CASE:str   =   "dataset_name"
       SCREAMING_SNAKE_CASE:Tuple   =   0.01
       SCREAMING_SNAKE_CASE:str   =   100_000
       SCREAMING_SNAKE_CASE:Optional[Any]   =   10_000
       SCREAMING_SNAKE_CASE:List[Any]   =   0.01
       SCREAMING_SNAKE_CASE:Union[str, Any]   =   0.02
       SCREAMING_SNAKE_CASE:Optional[Any]   =   0.03
       SCREAMING_SNAKE_CASE:Tuple   =   0.0_005
       SCREAMING_SNAKE_CASE:List[str]   =   0.000_001
       SCREAMING_SNAKE_CASE:Optional[int]   =   1
       SCREAMING_SNAKE_CASE:Optional[int]   =   10
       SCREAMING_SNAKE_CASE:Any   =   0.001
       SCREAMING_SNAKE_CASE:Optional[int]   =   0.1
       SCREAMING_SNAKE_CASE:Union[str, Any]   =   0.2
       SCREAMING_SNAKE_CASE:Optional[Any]   =   True

       # Model card mush be rendered and saved
       diffusers.utils.hub_utils.create_model_card(SCREAMING_SNAKE_CASE__       ,model_name="model_name"							)
       self.assertTrue((Path(SCREAMING_SNAKE_CASE__							) / "README.md").is_file()							)






