

import copy

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


SCREAMING_SNAKE_CASE_        =      logging.get_logger(__name__)

class 				a  (	UpperCAmelCase				):
						_lowercase    						=			"encoder-decoder"
						_lowercase    						=			True


						def __init__(       self						,					**A_	):







										'''simple docstring'''


										super().__init__(**A_	)
										assert (
										    "encoder" in kwargs and "decoder" in kwargs
										), "Config has to be initialized with encoder and decoder config"
										_UpperCAmelCase       :		Tuple 		=    kwargs.pop("encoder"	)
										_UpperCAmelCase       :		Tuple 		=    encoder_config.pop("model_type"	)
										_UpperCAmelCase       :		int 		=    kwargs.pop("decoder"	)
										_UpperCAmelCase       :		Any 		=    decoder_config.pop("model_type"	)

										from ..auto.configuration_auto import AutoConfig

										_UpperCAmelCase       :		Optional[Any] 		=    AutoConfig.for_model(A_						,					**A_	)
										_UpperCAmelCase       :		Any 		=    AutoConfig.for_model(A_						,					**A_	)
										_UpperCAmelCase       :		Any 		=    True


						@classmethod
						def        _UpperCAmelCase				(       cls						,					A_						,					A_						,					**A_	):







										'''simple docstring'''


										logger.info("Set `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config"	)
										_UpperCAmelCase       :		Tuple 		=    True
										_UpperCAmelCase       :		str 		=    True

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





						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


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





import warnings

from ...utils import logging
from .image_processing_deformable_detr import DeformableDetrImageProcessor


SCREAMING_SNAKE_CASE_        =      logging.get_logger(__name__)

class 				a  (	UpperCAmelCase				):


						def __init__(       self						,					*A_						,					**A_	):







										'''simple docstring'''


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


