


'''simple docstring'''






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


A   : List[Any]             =			logging.get_logger(__name__)

A   : Optional[int]             =			{
    'edbeeching/decision-transformer-gym-hopper-medium': (
        'https://huggingface.co/edbeeching/decision-transformer-gym-hopper-medium/resolve/main/config.json'
    ),
    # See all DecisionTransformer models at https://huggingface.co/models?filter=decision_transformer
}







class 			lowerCamelCase					(						__UpperCAmelCase  ):
					_SCREAMING_SNAKE_CASE							   =    "decision_transformer"
					_SCREAMING_SNAKE_CASE							   =    ["past_key_values"]
					_SCREAMING_SNAKE_CASE							   =    {
					    "max_position_embeddings": "n_positions",
					    "num_attention_heads": "n_head",
					    "num_hidden_layers": "n_layer",
					}


					def __init__(					self	:  Union[str, Any]       ,     __snake_case	:  Any=17       ,     __snake_case	:  List[str]=4       ,     __snake_case	:  List[Any]=1_28       ,     __snake_case	:  Tuple=40_96       ,     __snake_case	:  Optional[int]=True       ,     __snake_case	:  Optional[int]=1       ,     __snake_case	:  str=10_24       ,     __snake_case	:  Optional[Any]=3       ,     __snake_case	:  Optional[Any]=1       ,     __snake_case	:  Any=None       ,     __snake_case	:  Optional[Any]="relu"       ,     __snake_case	:  Optional[Any]=0.1       ,     __snake_case	:  Optional[int]=0.1       ,     __snake_case	:  Any=0.1       ,     __snake_case	:  List[str]=1e-5       ,     __snake_case	:  List[Any]=0.02       ,     __snake_case	:  Tuple=True       ,     __snake_case	:  Union[str, Any]=True       ,     __snake_case	:  Tuple=5_02_56       ,     __snake_case	:  List[Any]=5_02_56       ,     __snake_case	:  Optional[Any]=False       ,     __snake_case	:  List[Any]=False       ,     **__snake_case	:  Optional[int]       ,     ):





											'''simple docstring'''





											_snake_case:   str  					=		state_dim
											_snake_case:   Tuple  					=		act_dim
											_snake_case:   List[str]  					=		hidden_size
											_snake_case:   Any  					=		max_ep_len
											_snake_case:   List[Any]  					=		action_tanh
											_snake_case:   Dict  					=		vocab_size
											_snake_case:   Dict  					=		n_positions
											_snake_case:   List[str]  					=		n_layer
											_snake_case:   List[str]  					=		n_head
											_snake_case:   int  					=		n_inner
											_snake_case:   Any  					=		activation_function
											_snake_case:   List[Any]  					=		resid_pdrop
											_snake_case:   Dict  					=		embd_pdrop
											_snake_case:   Tuple  					=		attn_pdrop
											_snake_case:   int  					=		layer_norm_epsilon
											_snake_case:   List[Any]  					=		initializer_range
											_snake_case:   List[str]  					=		scale_attn_weights
											_snake_case:   Any  					=		use_cache
											_snake_case:   int  					=		scale_attn_by_inverse_layer_idx
											_snake_case:   Tuple  					=		reorder_and_upcast_attn

											_snake_case:   List[str]  					=		bos_token_id
											_snake_case:   Dict  					=		eos_token_id

											super().__init__(bos_token_id=__snake_case       ,     eos_token_id=__snake_case       ,     **__snake_case       )












'''simple docstring'''






from ..utils import DummyObject, requires_backends







class 			lowerCamelCase					(						metaclass=__UpperCAmelCase  ):
					_SCREAMING_SNAKE_CASE							   =    ["torch", "scipy"]


					def __init__(					self	:  Tuple       ,     *__snake_case	:  List[Any]       ,     **__snake_case	:  List[Any]       ):





											'''simple docstring'''





											requires_backends(self       ,     ['torch', 'scipy']       )


					@classmethod
					def    SCREAMING_SNAKE_CASE_		(					cls	:  Optional[int]       ,     *__snake_case	:  Optional[Any]       ,     **__snake_case	:  Tuple       ):





											'''simple docstring'''





											requires_backends(cls       ,     ['torch', 'scipy']       )




					@classmethod
					def    SCREAMING_SNAKE_CASE_		(					cls	:  List[Any]       ,     *__snake_case	:  Optional[Any]       ,     **__snake_case	:  str       ):





											'''simple docstring'''





											requires_backends(cls       ,     ['torch', 'scipy']       )





