


"""simple docstring"""

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


UpperCAmelCase__  							=logging.get_logger(__name__)

UpperCAmelCase__  							={"openai-gpt": "https://huggingface.co/openai-gpt/resolve/main/config.json"}





class    lowerCamelCase__						(		_a    ):
      a :     List[Any]											=		"""openai-gpt"""
      a :     Optional[Any]											=		{
          """max_position_embeddings""": """n_positions""",
          """hidden_size""": """n_embd""",
          """num_attention_heads""": """n_head""",
          """num_hidden_layers""": """n_layer""",
      }
      def __init__(		self	:	Union[str, Any]      ,       A_	:	List[str]=4_0_4_7_8      ,       A_	:	List[Any]=5_1_2      ,       A_	:	Dict=7_6_8      ,       A_	:	Optional[int]=1_2      ,       A_	:	Optional[int]=1_2      ,       A_	:	Tuple="gelu"      ,       A_	:	List[Any]=0.1      ,       A_	:	List[str]=0.1      ,       A_	:	Optional[int]=0.1      ,       A_	:	List[Any]=1e-5      ,       A_	:	Dict=0.02      ,       A_	:	Any="cls_index"      ,       A_	:	Union[str, Any]=True      ,       A_	:	Optional[int]=None      ,       A_	:	List[str]=True      ,       A_	:	Tuple=0.1      ,       **A_	:	List[Any]      ,       ):






       '''simple docstring'''


       __lowercase									=	vocab_size
       __lowercase									=	n_positions
       __lowercase									=	n_embd
       __lowercase									=	n_layer
       __lowercase									=	n_head
       __lowercase									=	afn
       __lowercase									=	resid_pdrop
       __lowercase									=	embd_pdrop
       __lowercase									=	attn_pdrop
       __lowercase									=	layer_norm_epsilon
       __lowercase									=	initializer_range
       __lowercase									=	summary_type
       __lowercase									=	summary_use_proj
       __lowercase									=	summary_activation
       __lowercase									=	summary_first_dropout
       __lowercase									=	summary_proj_to_labels
       super().__init__(**UpperCAmelCase__							)




"""simple docstring"""

import inspect
import unittest





class    lowerCamelCase__						(		unittest.TestCase    ):
      def SCREAMING_SNAKE_CASE_	(		self	:	int							):






       '''simple docstring'''


       try:
        import diffusers  # noqa: F401
       except ImportError:
        assert False






      def SCREAMING_SNAKE_CASE_	(		self	:	Optional[Any]							):






       '''simple docstring'''


       import diffusers
       from diffusers.dependency_versions_table import deps

       __lowercase									=	inspect.getmembers(A_      ,       inspect.isclass							)

       for cls_name, cls_module in all_classes:
        if "dummy_" in cls_module.__module__:
         for backend in cls_module._backends:
          if backend == "k_diffusion":
           __lowercase									=	"""k-diffusion"""
          elif backend == "invisible_watermark":
           __lowercase									=	"""invisible-watermark"""
          assert backend in deps, F'''{backend} is not in the deps table!'''
