"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


lowercase__					       =	{
    'configuration_clip': [
        'CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'CLIPConfig',
        'CLIPOnnxConfig',
        'CLIPTextConfig',
        'CLIPVisionConfig',
    ],
    'processing_clip': ['CLIPProcessor'],
    'tokenization_clip': ['CLIPTokenizer'],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowercase__					       =	['CLIPTokenizerFast']

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowercase__					       =	['CLIPFeatureExtractor']
 lowercase__					       =	['CLIPImageProcessor']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowercase__					       =	[
     'CLIP_PRETRAINED_MODEL_ARCHIVE_LIST',
     'CLIPModel',
     'CLIPPreTrainedModel',
     'CLIPTextModel',
     'CLIPTextModelWithProjection',
     'CLIPVisionModel',
     'CLIPVisionModelWithProjection',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowercase__					       =	[
     'TF_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFCLIPModel',
     'TFCLIPPreTrainedModel',
     'TFCLIPTextModel',
     'TFCLIPVisionModel',
 ]

try:
 if not is_flax_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowercase__					       =	[
     'FlaxCLIPModel',
     'FlaxCLIPPreTrainedModel',
     'FlaxCLIPTextModel',
     'FlaxCLIPTextPreTrainedModel',
     'FlaxCLIPVisionModel',
     'FlaxCLIPVisionPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_clip import (
     CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
     CLIPConfig,
     CLIPOnnxConfig,
     CLIPTextConfig,
     CLIPVisionConfig,
 )
 from .processing_clip import CLIPProcessor
 from .tokenization_clip import CLIPTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_clip_fast import CLIPTokenizerFast

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_clip import CLIPFeatureExtractor
  from .image_processing_clip import CLIPImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_clip import (
      CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
      CLIPModel,
      CLIPPreTrainedModel,
      CLIPTextModel,
      CLIPTextModelWithProjection,
      CLIPVisionModel,
      CLIPVisionModelWithProjection,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_clip import (
      TF_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFCLIPModel,
      TFCLIPPreTrainedModel,
      TFCLIPTextModel,
      TFCLIPVisionModel,
  )

 try:
  if not is_flax_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_flax_clip import (
      FlaxCLIPModel,
      FlaxCLIPPreTrainedModel,
      FlaxCLIPTextModel,
      FlaxCLIPTextPreTrainedModel,
      FlaxCLIPVisionModel,
      FlaxCLIPVisionPreTrainedModel,
  )


else:
 import sys

 lowercase__					       =	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase__					       =	logging.get_logger(__name__)

lowercase__					       =	{
    '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    __snake_case       (     __lowerCAmelCase				):
      a__        =		"""decision_transformer"""
      a__        =		["""past_key_values"""]
      a__        =		{
          """max_position_embeddings""": """n_positions""",
          """num_attention_heads""": """n_head""",
          """num_hidden_layers""": """n_layer""",
      }



      def __init__(						self    ,			lowercase=17    ,			lowercase=4    ,			lowercase=1_28    ,			lowercase=40_96    ,			lowercase=True    ,			lowercase=1    ,			lowercase=10_24    ,			lowercase=3    ,			lowercase=1    ,			lowercase=None    ,			lowercase="relu"    ,			lowercase=0.1    ,			lowercase=0.1    ,			lowercase=0.1    ,			lowercase=1e-5    ,			lowercase=0.02    ,			lowercase=True    ,			lowercase=True    ,			lowercase=5_02_56    ,			lowercase=5_02_56    ,			lowercase=False    ,			lowercase=False    ,			**lowercase    ,			)	->			Tuple:





        '''simple docstring'''





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

        a__:     Any										=	bos_token_id
        a__:     int										=	eos_token_id

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


