




'''simple docstring'''





from typing import List, Optional, Union

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


UpperCamelCase_						:      Dict       =						logging.get_logger(__name__)

UpperCamelCase_						:      int       =						{
    '''huggingface/informer-tourism-monthly''': (
        '''https://huggingface.co/huggingface/informer-tourism-monthly/resolve/main/config.json'''
    ),
    # See all Informer models at https://huggingface.co/models?filter=informer
}

class        _a    (						__lowerCAmelCase							):
     SCREAMING_SNAKE_CASE_							:   List[Any]       =						"""informer"""
     SCREAMING_SNAKE_CASE_							:   str       =						{
         """hidden_size""": """d_model""",
         """num_attention_heads""": """encoder_attention_heads""",
         """num_hidden_layers""": """encoder_layers""",
     }






     def __init__(			self ,_SCREAMING_SNAKE_CASE = None ,_SCREAMING_SNAKE_CASE = None ,_SCREAMING_SNAKE_CASE = "student_t" ,_SCREAMING_SNAKE_CASE = "nll" ,_SCREAMING_SNAKE_CASE = 1 ,_SCREAMING_SNAKE_CASE = None ,_SCREAMING_SNAKE_CASE = "mean" ,_SCREAMING_SNAKE_CASE = 0 ,_SCREAMING_SNAKE_CASE = 0 ,_SCREAMING_SNAKE_CASE = 0 ,_SCREAMING_SNAKE_CASE = 0 ,_SCREAMING_SNAKE_CASE = None ,_SCREAMING_SNAKE_CASE = None ,_SCREAMING_SNAKE_CASE = 64 ,_SCREAMING_SNAKE_CASE = 32 ,_SCREAMING_SNAKE_CASE = 32 ,_SCREAMING_SNAKE_CASE = 2 ,_SCREAMING_SNAKE_CASE = 2 ,_SCREAMING_SNAKE_CASE = 2 ,_SCREAMING_SNAKE_CASE = 2 ,_SCREAMING_SNAKE_CASE = True ,_SCREAMING_SNAKE_CASE = "gelu" ,_SCREAMING_SNAKE_CASE = 0.0_5 ,_SCREAMING_SNAKE_CASE = 0.1 ,_SCREAMING_SNAKE_CASE = 0.1 ,_SCREAMING_SNAKE_CASE = 0.1 ,_SCREAMING_SNAKE_CASE = 0.1 ,_SCREAMING_SNAKE_CASE = 100 ,_SCREAMING_SNAKE_CASE = 0.0_2 ,_SCREAMING_SNAKE_CASE=True ,_SCREAMING_SNAKE_CASE = "prob" ,_SCREAMING_SNAKE_CASE = 5 ,_SCREAMING_SNAKE_CASE = True ,**_SCREAMING_SNAKE_CASE ,)							->      Dict:
          # time series specific configuration
          _snake_case							=				prediction_length
          _snake_case							=				context_length or prediction_length
          _snake_case							=				distribution_output
          _snake_case							=				loss
          _snake_case							=				input_size
          _snake_case							=				num_time_features
          _snake_case							=				lags_sequence if lags_sequence is not None else [1, 2, 3, 4, 5, 6, 7]
          _snake_case							=				scaling
          _snake_case							=				num_dynamic_real_features
          _snake_case							=				num_static_real_features
          _snake_case							=				num_static_categorical_features

          # set cardinality
          if cardinality and num_static_categorical_features > 0:
               if len(_SCREAMING_SNAKE_CASE   ) != num_static_categorical_features:
                    raise ValueError(
                        "The cardinality should be a list of the same length as `num_static_categorical_features`"   )
               _snake_case							=				cardinality
          else:
               _snake_case							=				[0]

          # set embedding_dimension
          if embedding_dimension and num_static_categorical_features > 0:
               if len(_SCREAMING_SNAKE_CASE   ) != num_static_categorical_features:
                    raise ValueError(
                        "The embedding dimension should be a list of the same length as `num_static_categorical_features`"   )
               _snake_case							=				embedding_dimension
          else:
               _snake_case							=				[min(50 ,(cat + 1) // 2   ) for cat in self.cardinality]

          _snake_case							=				num_parallel_samples

          # Transformer architecture configuration
          _snake_case							=				input_size * len(self.lags_sequence   ) + self._number_of_features
          _snake_case							=				d_model
          _snake_case							=				encoder_attention_heads
          _snake_case							=				decoder_attention_heads
          _snake_case							=				encoder_ffn_dim
          _snake_case							=				decoder_ffn_dim
          _snake_case							=				encoder_layers
          _snake_case							=				decoder_layers

          _snake_case							=				dropout
          _snake_case							=				attention_dropout
          _snake_case							=				activation_dropout
          _snake_case							=				encoder_layerdrop
          _snake_case							=				decoder_layerdrop

          _snake_case							=				activation_function
          _snake_case							=				init_std

          _snake_case							=				use_cache

          # Informer
          _snake_case							=				attention_type
          _snake_case							=				sampling_factor
          _snake_case							=				distil

          super().__init__(is_encoder_decoder=_SCREAMING_SNAKE_CASE ,**_SCREAMING_SNAKE_CASE   )






     @property
     def     _lowercase     (			self   )							->      int:
          return (
              sum(self.embedding_dimension   )
              + self.num_dynamic_real_features
              + self.num_time_features
              + self.num_static_real_features
              + self.input_size * 2  # the log1p(abs(loc)) and log(scale) features
          )








'''simple docstring'''





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


UpperCamelCase_						:      int       =						logging.get_logger(__name__)

UpperCamelCase_						:      Tuple       =						{
    '''sayakpaul/vit-msn-base''': '''https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json''',
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}

class        _a    (						__lowerCAmelCase							):
     SCREAMING_SNAKE_CASE_							:   List[str]       =						"""vit_msn"""






     def __init__(			self ,_SCREAMING_SNAKE_CASE=768 ,_SCREAMING_SNAKE_CASE=12 ,_SCREAMING_SNAKE_CASE=12 ,_SCREAMING_SNAKE_CASE=3_072 ,_SCREAMING_SNAKE_CASE="gelu" ,_SCREAMING_SNAKE_CASE=0.0 ,_SCREAMING_SNAKE_CASE=0.0 ,_SCREAMING_SNAKE_CASE=0.0_2 ,_SCREAMING_SNAKE_CASE=1e-06 ,_SCREAMING_SNAKE_CASE=224 ,_SCREAMING_SNAKE_CASE=16 ,_SCREAMING_SNAKE_CASE=3 ,_SCREAMING_SNAKE_CASE=True ,**_SCREAMING_SNAKE_CASE ,)							->      int:
          super().__init__(**_SCREAMING_SNAKE_CASE   )

          _snake_case							=				hidden_size
          _snake_case							=				num_hidden_layers
          _snake_case							=				num_attention_heads
          _snake_case							=				intermediate_size
          _snake_case							=				hidden_act
          _snake_case							=				hidden_dropout_prob
          _snake_case							=				attention_probs_dropout_prob
          _snake_case							=				initializer_range
          _snake_case							=				layer_norm_eps
          _snake_case							=				image_size
          _snake_case							=				patch_size
          _snake_case							=				num_channels
          _snake_case							=				qkv_bias


