
"""simple docstring"""





from typing import List, Optional, Union

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


__magic_name__       =			logging.get_logger(__name__)

__magic_name__       =			{
    "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 						SCREAMING_SNAKE_CASE_ (						__a ):




		"""simple docstring"""





		__lowercase							:  Dict						   =		'''informer'''
		__lowercase							:  Union[str, Any]						   =		{
		    '''hidden_size''': '''d_model''',
		    '''num_attention_heads''': '''encoder_attention_heads''',
		    '''num_hidden_layers''': '''encoder_layers''',
		}




		def __init__(     self							,  lowerCAmelCase__ = None							,  lowerCAmelCase__ = None							,  lowerCAmelCase__ = "student_t"							,  lowerCAmelCase__ = "nll"							,  lowerCAmelCase__ = 1							,  lowerCAmelCase__ = None							,  lowerCAmelCase__ = "mean"							,  lowerCAmelCase__ = 0							,  lowerCAmelCase__ = 0							,  lowerCAmelCase__ = 0							,  lowerCAmelCase__ = 0							,  lowerCAmelCase__ = None							,  lowerCAmelCase__ = None							,  lowerCAmelCase__ = 6_4							,  lowerCAmelCase__ = 3_2							,  lowerCAmelCase__ = 3_2							,  lowerCAmelCase__ = 2							,  lowerCAmelCase__ = 2							,  lowerCAmelCase__ = 2							,  lowerCAmelCase__ = 2							,  lowerCAmelCase__ = True							,  lowerCAmelCase__ = "gelu"							,  lowerCAmelCase__ = 0.05							,  lowerCAmelCase__ = 0.1							,  lowerCAmelCase__ = 0.1							,  lowerCAmelCase__ = 0.1							,  lowerCAmelCase__ = 0.1							,  lowerCAmelCase__ = 1_0_0							,  lowerCAmelCase__ = 0.02							,  lowerCAmelCase__=True							,  lowerCAmelCase__ = "prob"							,  lowerCAmelCase__ = 5							,  lowerCAmelCase__ = True							,  **lowerCAmelCase__							,  ):
				# time series specific configuration
				__SCREAMING_SNAKE_CASE            = prediction_length
				__SCREAMING_SNAKE_CASE            = context_length or prediction_length
				__SCREAMING_SNAKE_CASE            = distribution_output
				__SCREAMING_SNAKE_CASE            = loss
				__SCREAMING_SNAKE_CASE            = input_size
				__SCREAMING_SNAKE_CASE            = num_time_features
				__SCREAMING_SNAKE_CASE            = lags_sequence if lags_sequence is not None else [1, 2, 3, 4, 5, 6, 7]
				__SCREAMING_SNAKE_CASE            = scaling
				__SCREAMING_SNAKE_CASE            = num_dynamic_real_features
				__SCREAMING_SNAKE_CASE            = num_static_real_features
				__SCREAMING_SNAKE_CASE            = num_static_categorical_features

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

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

				__SCREAMING_SNAKE_CASE            = num_parallel_samples

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

				__SCREAMING_SNAKE_CASE            = dropout
				__SCREAMING_SNAKE_CASE            = attention_dropout
				__SCREAMING_SNAKE_CASE            = activation_dropout
				__SCREAMING_SNAKE_CASE            = encoder_layerdrop
				__SCREAMING_SNAKE_CASE            = decoder_layerdrop

				__SCREAMING_SNAKE_CASE            = activation_function
				__SCREAMING_SNAKE_CASE            = init_std

				__SCREAMING_SNAKE_CASE            = use_cache

				# Informer
				__SCREAMING_SNAKE_CASE            = attention_type
				__SCREAMING_SNAKE_CASE            = sampling_factor
				__SCREAMING_SNAKE_CASE            = distil

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




		@property
		def 	snake_case_     (     self):
				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_yolos import YolosImageProcessor


__magic_name__       =			logging.get_logger(__name__)
class 						SCREAMING_SNAKE_CASE_ (						__a ):




		"""simple docstring"""





		def __init__(     self							,  *lowerCAmelCase__							,  **lowerCAmelCase__):
				warnings.warn(
				    """The class YolosFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"""
				    """ use YolosImageProcessor instead."""							,  lowerCAmelCase__							,  )
				super().__init__(*lowerCAmelCase__							,  **lowerCAmelCase__)




