



'''simple docstring'''





from typing import List, Optional, Union

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


lowercase_		       =  logging.get_logger(__name__)

lowercase_		       =  {
    "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			(  A						):



 '''simple docstring'''







 __lowerCamelCase    :       str          =       'informer'
 __lowerCamelCase    :       Optional[int]          =       {
     'hidden_size': 'd_model',
     'num_attention_heads': 'encoder_attention_heads',
     'num_hidden_layers': 'encoder_layers',
 }



 def __init__(self ,   A = None ,   A = None ,   A = "student_t" ,   A = "nll" ,   A = 1 ,   A = None ,   A = "mean" ,   A = 0 ,   A = 0 ,   A = 0 ,   A = 0 ,   A = None ,   A = None ,   A = 64 ,   A = 32 ,   A = 32 ,   A = 2 ,   A = 2 ,   A = 2 ,   A = 2 ,   A = True ,   A = "gelu" ,   A = 0.05 ,   A = 0.1 ,   A = 0.1 ,   A = 0.1 ,   A = 0.1 ,   A = 100 ,   A = 0.02 ,   A=True ,   A = "prob" ,   A = 5 ,   A = True ,   **A ,   )    ->     List[Any]:


      """simple docstring"""



      _a      =  prediction_length
      _a      =  context_length or prediction_length
      _a      =  distribution_output
      _a      =  loss
      _a      =  input_size
      _a      =  num_time_features
      _a      =  lags_sequence if lags_sequence is not None else [1, 2, 3, 4, 5, 6, 7]
      _a      =  scaling
      _a      =  num_dynamic_real_features
      _a      =  num_static_real_features
      _a      =  num_static_categorical_features

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

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

      _a      =  num_parallel_samples

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

      _a      =  dropout
      _a      =  attention_dropout
      _a      =  activation_dropout
      _a      =  encoder_layerdrop
      _a      =  decoder_layerdrop

      _a      =  activation_function
      _a      =  init_std

      _a      =  use_cache

      # Informer
      _a      =  attention_type
      _a      =  sampling_factor
      _a      =  distil

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



 @property
 def 					a__  (self       )    ->     int:


      """simple docstring"""



      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 collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowercase_		       =  logging.get_logger(__name__)

lowercase_		       =  {
    "facebook/xmod-base": "https://huggingface.co/facebook/xmod-base/resolve/main/config.json",
    "facebook/xmod-large-prenorm": "https://huggingface.co/facebook/xmod-large-prenorm/resolve/main/config.json",
    "facebook/xmod-base-13-125k": "https://huggingface.co/facebook/xmod-base-13-125k/resolve/main/config.json",
    "facebook/xmod-base-30-125k": "https://huggingface.co/facebook/xmod-base-30-125k/resolve/main/config.json",
    "facebook/xmod-base-30-195k": "https://huggingface.co/facebook/xmod-base-30-195k/resolve/main/config.json",
    "facebook/xmod-base-60-125k": "https://huggingface.co/facebook/xmod-base-60-125k/resolve/main/config.json",
    "facebook/xmod-base-60-265k": "https://huggingface.co/facebook/xmod-base-60-265k/resolve/main/config.json",
    "facebook/xmod-base-75-125k": "https://huggingface.co/facebook/xmod-base-75-125k/resolve/main/config.json",
    "facebook/xmod-base-75-269k": "https://huggingface.co/facebook/xmod-base-75-269k/resolve/main/config.json",
}






class __A			(  A						):



 '''simple docstring'''







 __lowerCamelCase    :       Any          =       'xmod'



 def __init__(self ,   A=30_522 ,   A=768 ,   A=12 ,   A=12 ,   A=3_072 ,   A="gelu" ,   A=0.1 ,   A=0.1 ,   A=512 ,   A=2 ,   A=0.02 ,   A=1E-12 ,   A=1 ,   A=0 ,   A=2 ,   A="absolute" ,   A=True ,   A=None ,   A=False ,   A=2 ,   A=False ,   A=True ,   A=True ,   A=("en_XX",) ,   A=None ,   **A ,   )    ->     List[str]:


      """simple docstring"""



      super().__init__(pad_token_id=A ,   bos_token_id=A ,   eos_token_id=A ,   **A       )

      _a      =  vocab_size
      _a      =  hidden_size
      _a      =  num_hidden_layers
      _a      =  num_attention_heads
      _a      =  hidden_act
      _a      =  intermediate_size
      _a      =  hidden_dropout_prob
      _a      =  attention_probs_dropout_prob
      _a      =  max_position_embeddings
      _a      =  type_vocab_size
      _a      =  initializer_range
      _a      =  layer_norm_eps
      _a      =  position_embedding_type
      _a      =  use_cache
      _a      =  classifier_dropout
      _a      =  pre_norm
      _a      =  adapter_reduction_factor
      _a      =  adapter_layer_norm
      _a      =  adapter_reuse_layer_norm
      _a      =  ln_before_adapter
      _a      =  list(A       )
      _a      =  default_language






class __A			(  A						):



 '''simple docstring'''







 @property
 def 					a__  (self       )    ->     Mapping[str, Mapping[int, str]]:


      """simple docstring"""



      if self.task == "multiple-choice":
           _a      =  {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
      else:
           _a      =  {0: '''batch''', 1: '''sequence'''}
      return OrderedDict(
          [
              ('''input_ids''', dynamic_axis),
              ('''attention_mask''', dynamic_axis),
          ]       )



