





'''simple docstring'''






import copy

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


__UpperCamelCase					    =	logging.get_logger(__name__)




class  _A (					__lowercase		):
		lowercase__:   Any				     =   '''encoder-decoder'''
		lowercase__:   str				     =   True

		def __init__(   self					:   str  ,      **__magic_name__					:   int			)					->    str:


					"""simple docstring"""

					super().__init__(**__magic_name__			)
					assert (
					    "encoder" in kwargs and "decoder" in kwargs
					), "Config has to be initialized with encoder and decoder config"
					__snake_case					:      Any							      =     kwargs.pop("""encoder"""			)
					__snake_case					:      Union[str, Any]							      =     encoder_config.pop("""model_type"""			)
					__snake_case					:      Optional[int]							      =     kwargs.pop("""decoder"""			)
					__snake_case					:      Dict							      =     decoder_config.pop("""model_type"""			)

					from ..auto.configuration_auto import AutoConfig

					__snake_case					:      Optional[Any]							      =     AutoConfig.for_model(__magic_name__  ,      **__magic_name__			)
					__snake_case					:      Optional[Any]							      =     AutoConfig.for_model(__magic_name__  ,      **__magic_name__			)
					__snake_case					:      List[str]							      =     True

		@classmethod
		def 	lowercase__     (   cls					:   Optional[Any]  ,      __magic_name__					:   PretrainedConfig  ,      __magic_name__					:   PretrainedConfig  ,      **__magic_name__					:   Dict			)					->    PretrainedConfig:


					"""simple docstring"""

					logger.info("""Set `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config"""			)
					__snake_case					:      List[Any]							      =     True
					__snake_case					:      Any							      =     True

					return cls(encoder=encoder_config.to_dict()  ,      decoder=decoder_config.to_dict()  ,      **__magic_name__			)

		def 	lowercase__     (   self					:   Optional[int]			)					->    str:


					"""simple docstring"""

					__snake_case					:      Union[str, Any]							      =     copy.deepcopy(self.__dict__			)
					__snake_case					:      int							      =     self.encoder.to_dict()
					__snake_case					:      List[str]							      =     self.decoder.to_dict()
					__snake_case					:      Tuple							      =     self.__class__.model_type
					return output









'''simple docstring'''






import warnings

from ...utils import logging
from .image_processing_owlvit import OwlViTImageProcessor


__UpperCamelCase					    =	logging.get_logger(__name__)




class  _A (					__lowercase		):

		def __init__(   self					:   int  ,      *__magic_name__					:   Optional[Any]  ,      **__magic_name__					:   Any			)					->    None:


					"""simple docstring"""

					warnings.warn(
					    """The class OwlViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"""
					    """ use OwlViTImageProcessor instead."""  ,      __magic_name__  ,      )
					super().__init__(*__magic_name__  ,      **__magic_name__			)


