





import importlib
import os
from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, Optional, Union

import torch

from ..utils import BaseOutput


UpperCamelCase__											= "scheduler_config.json"

class        __SCREAMING_SNAKE_CASE					(     _a       ):
			snake_case     :      Optional[int]						     =       1
			snake_case     :      List[Any]						     =       2
			snake_case     :      Any						     =       3
			snake_case     :      List[str]						     =       4
			snake_case     :      Dict						     =       5
			snake_case     :      int						     =       6
			snake_case     :      Optional[int]						     =       7
			snake_case     :      Tuple						     =       8
			snake_case     :      List[str]						     =       9
			snake_case     :      Union[str, Any]						     =       10
			snake_case     :      Tuple						     =       11
			snake_case     :      Tuple						     =       12
			snake_case     :      Optional[int]						     =       13
			snake_case     :      Optional[int]						     =       14






@dataclass
class        __SCREAMING_SNAKE_CASE					(     _a       ):
			snake_case     :      torch.FloatTensor






class        __SCREAMING_SNAKE_CASE					:
			snake_case     :      Optional[Any]						     =       SCHEDULER_CONFIG_NAME
			snake_case     :      Any						     =       []
			snake_case     :      List[str]						     =       True






			@classmethod
			def 				_lowerCamelCase		(						cls  , __lowerCAmelCase = None  , __lowerCAmelCase = None  , __lowerCAmelCase=False  , **__lowerCAmelCase  , ):
										UpperCamelCase__     ,     UpperCamelCase__     ,     UpperCamelCase__				     =			cls.load_config(
										    pretrained_model_name_or_path=__lowerCAmelCase  , subfolder=__lowerCAmelCase  , return_unused_kwargs=__lowerCAmelCase  , return_commit_hash=__lowerCAmelCase  , **__lowerCAmelCase  , )
										return cls.from_config(__lowerCAmelCase  , return_unused_kwargs=__lowerCAmelCase  , **__lowerCAmelCase  )






			def 				_lowerCamelCase		(						self  , __lowerCAmelCase  , __lowerCAmelCase = False  , **__lowerCAmelCase  ):
										self.save_config(save_directory=__lowerCAmelCase  , push_to_hub=__lowerCAmelCase  , **__lowerCAmelCase  )






			@property
			def 				_lowerCamelCase		(						self  ):
										return self._get_compatibles()







			@classmethod
			def 				_lowerCamelCase		(						cls  ):
										UpperCamelCase__				     =			list(set([cls.__name__] + cls._compatibles  )  )
										UpperCamelCase__				     =			importlib.import_module(__name__.split("""."""  )[0]  )
										UpperCamelCase__				     =			[
										    getattr(__lowerCAmelCase  , __lowerCAmelCase  ) for c in compatible_classes_str if hasattr(__lowerCAmelCase  , __lowerCAmelCase  )
										]
										return compatible_classes











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


UpperCamelCase__											= logging.get_logger(__name__)

UpperCamelCase__											= {
    "studio-ousia/luke-base": "https://huggingface.co/studio-ousia/luke-base/resolve/main/config.json",
    "studio-ousia/luke-large": "https://huggingface.co/studio-ousia/luke-large/resolve/main/config.json",
}

class        __SCREAMING_SNAKE_CASE					(     _a       ):
							snake_case     :      Optional[int]						     =       """luke"""






							def __init__(						self  , __lowerCAmelCase=50267  , __lowerCAmelCase=500000  , __lowerCAmelCase=768  , __lowerCAmelCase=256  , __lowerCAmelCase=12  , __lowerCAmelCase=12  , __lowerCAmelCase=3072  , __lowerCAmelCase="gelu"  , __lowerCAmelCase=0.1  , __lowerCAmelCase=0.1  , __lowerCAmelCase=512  , __lowerCAmelCase=2  , __lowerCAmelCase=0.02  , __lowerCAmelCase=1E-12  , __lowerCAmelCase=True  , __lowerCAmelCase=None  , __lowerCAmelCase=1  , __lowerCAmelCase=0  , __lowerCAmelCase=2  , **__lowerCAmelCase  , ):
														super().__init__(pad_token_id=__lowerCAmelCase  , bos_token_id=__lowerCAmelCase  , eos_token_id=__lowerCAmelCase  , **__lowerCAmelCase  )

														UpperCamelCase__				     =			vocab_size
														UpperCamelCase__				     =			entity_vocab_size
														UpperCamelCase__				     =			hidden_size
														UpperCamelCase__				     =			entity_emb_size
														UpperCamelCase__				     =			num_hidden_layers
														UpperCamelCase__				     =			num_attention_heads
														UpperCamelCase__				     =			hidden_act
														UpperCamelCase__				     =			intermediate_size
														UpperCamelCase__				     =			hidden_dropout_prob
														UpperCamelCase__				     =			attention_probs_dropout_prob
														UpperCamelCase__				     =			max_position_embeddings
														UpperCamelCase__				     =			type_vocab_size
														UpperCamelCase__				     =			initializer_range
														UpperCamelCase__				     =			layer_norm_eps
														UpperCamelCase__				     =			use_entity_aware_attention
														UpperCamelCase__				     =			classifier_dropout




