
'''simple docstring'''







from typing import List, Optional, Union

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


__lowerCAmelCase         =    logging.get_logger(__name__)

__lowerCAmelCase         =    {
    """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 UpperCAmelCase__	( lowercase__	):





  """simple docstring"""

  __UpperCAmelCase				:				int   =					'''informer'''
  __UpperCAmelCase				:				Dict   =					{
      '''hidden_size''': '''d_model''',
      '''num_attention_heads''': '''encoder_attention_heads''',
      '''num_hidden_layers''': '''encoder_layers''',
  }


  def __init__(		self      :     List[str]							,_a      :     Optional[int] = None							,_a      :     Optional[int] = None							,_a      :     str = "student_t"							,_a      :     str = "nll"							,_a      :     int = 1							,_a      :     List[int] = None							,_a      :     Optional[Union[str, bool]] = "mean"							,_a      :     int = 0							,_a      :     int = 0							,_a      :     int = 0							,_a      :     int = 0							,_a      :     Optional[List[int]] = None							,_a      :     Optional[List[int]] = None							,_a      :     int = 64							,_a      :     int = 32							,_a      :     int = 32							,_a      :     int = 2							,_a      :     int = 2							,_a      :     int = 2							,_a      :     int = 2							,_a      :     bool = True							,_a      :     str = "gelu"							,_a      :     float = 0.05							,_a      :     float = 0.1							,_a      :     float = 0.1							,_a      :     float = 0.1							,_a      :     float = 0.1							,_a      :     int = 100							,_a      :     float = 0.02							,_a      :     Any=True							,_a      :     str = "prob"							,_a      :     int = 5							,_a      :     bool = True							,**_a      :     Optional[Any]							,):


     '''simple docstring'''






     _a				:	str			=   prediction_length
     _a				:	Union[str, Any]			=   context_length or prediction_length
     _a				:	Optional[int]			=   distribution_output
     _a				:	Any			=   loss
     _a				:	Optional[Any]			=   input_size
     _a				:	Union[str, Any]			=   num_time_features
     _a				:	Optional[Any]			=   lags_sequence if lags_sequence is not None else [1, 2, 3, 4, 5, 6, 7]
     _a				:	List[str]			=   scaling
     _a				:	Optional[Any]			=   num_dynamic_real_features
     _a				:	Dict			=   num_static_real_features
     _a				:	List[Any]			=   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				:	Optional[int]			=   cardinality
     else:
        _a				:	Tuple			=   [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				:	Optional[int]			=   embedding_dimension
     else:
        _a				:	List[str]			=   [min(50							,(cat + 1) // 2       ) for cat in self.cardinality]

     _a				:	str			=   num_parallel_samples

     # Transformer architecture configuration
     _a				:	Optional[int]			=   input_size * len(self.lags_sequence       ) + self._number_of_features
     _a				:	Union[str, Any]			=   d_model
     _a				:	Union[str, Any]			=   encoder_attention_heads
     _a				:	str			=   decoder_attention_heads
     _a				:	List[str]			=   encoder_ffn_dim
     _a				:	Tuple			=   decoder_ffn_dim
     _a				:	Tuple			=   encoder_layers
     _a				:	Tuple			=   decoder_layers

     _a				:	Any			=   dropout
     _a				:	Tuple			=   attention_dropout
     _a				:	Optional[int]			=   activation_dropout
     _a				:	Optional[Any]			=   encoder_layerdrop
     _a				:	List[Any]			=   decoder_layerdrop

     _a				:	Tuple			=   activation_function
     _a				:	Union[str, Any]			=   init_std

     _a				:	int			=   use_cache

     # Informer
     _a				:	List[str]			=   attention_type
     _a				:	int			=   sampling_factor
     _a				:	List[Any]			=   distil

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


  @property
  def   __lowercase		(		self      :     Any       ):


     '''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'''







import warnings

from ...utils import logging
from .image_processing_beit import BeitImageProcessor


__lowerCAmelCase         =    logging.get_logger(__name__)







class UpperCAmelCase__	( lowercase__	):





  """simple docstring"""

  def __init__(		self      :     int							,*_a      :     Optional[int]							,**_a      :     str       ):


     '''simple docstring'''






     warnings.warn(
         'The class BeitFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'
         ' use BeitImageProcessor instead.'							,_a							,)
     super().__init__(*_a							,**_a       )



