

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


a_      =     logging.get_logger(__name__)

a_      =     {
    '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 _UpperCamelCase				(				__A ):
			'''simple docstring'''







			lowerCamelCase__							     ='decision_transformer'
			lowerCamelCase__							     =['past_key_values']
			lowerCamelCase__							     ={
			    'max_position_embeddings': 'n_positions',
			    'num_attention_heads': 'n_head',
			    'num_hidden_layers': 'n_layer',
			}
			def __init__(      self				:			str   ,   a				:			List[str]=17   ,   a				:			Optional[int]=4   ,   a				:			List[str]=128   ,   a				:			Union[str, Any]=4096   ,   a				:			Union[str, Any]=True   ,   a				:			Dict=1   ,   a				:			Optional[Any]=1024   ,   a				:			int=3   ,   a				:			Any=1   ,   a				:			str=None   ,   a				:			List[Any]="relu"   ,   a				:			Optional[Any]=0.1   ,   a				:			int=0.1   ,   a				:			Dict=0.1   ,   a				:			List[str]=1e-5   ,   a				:			List[str]=0.02   ,   a				:			str=True   ,   a				:			Any=True   ,   a				:			Tuple=5_0256   ,   a				:			List[str]=5_0256   ,   a				:			Dict=False   ,   a				:			int=False   ,   **a				:			Any   ,   )				->							List[Any]:

				"""simple docstring"""

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

				SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							bos_token_id
				SCREAMING_SNAKE_CASE :   Optional[Any]					  =							eos_token_id

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


def 			lowerCamelCase__			(       _a):
	if not isinstance(_a				,      _a):
		SCREAMING_SNAKE_CASE :   Tuple					  =							f"Input value of [number={number}] must be an integer"
		raise TypeError(_a)
	if number < 0:
		return False
	SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							number * number
	while number > 0:
		if number % 10 != number_square % 10:
			return False
		number //= 10
		number_square //= 10
	return True


if __name__ == "__main__":
			import doctest

			doctest.testmod()