

import copy

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


lowerCAmelCase_       	=	logging.get_logger(__name__)





class 	snake_case_   (		__A					):







			'''simple docstring'''

			SCREAMING_SNAKE_CASE     :   Tuple									=				"encoder-decoder"
			SCREAMING_SNAKE_CASE     :   List[Any]									=				True







			def __init__(     self :				Tuple							,   **_UpperCamelCase :				List[str]							)      ->Dict:
									super().__init__(**_UpperCamelCase							)
									assert (
									    "encoder" in kwargs and "decoder" in kwargs
									), "Config has to be initialized with encoder and decoder config"
									snake_case_   =	kwargs.pop('''encoder'''							)
									snake_case_   =	encoder_config.pop('''model_type'''							)
									snake_case_   =	kwargs.pop('''decoder'''							)
									snake_case_   =	decoder_config.pop('''model_type'''							)

									from ..auto.configuration_auto import AutoConfig

									snake_case_   =	AutoConfig.for_model(_UpperCamelCase							,   **_UpperCamelCase							)
									snake_case_   =	AutoConfig.for_model(_UpperCamelCase							,   **_UpperCamelCase							)
									snake_case_   =	True







			@classmethod
			def 				snake_case__(     cls :				int							,   _UpperCamelCase :				PretrainedConfig							,   _UpperCamelCase :				PretrainedConfig							,   **_UpperCamelCase :				Any							)      ->PretrainedConfig:
									logger.info('''Set `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config'''							)
									snake_case_   =	True
									snake_case_   =	True

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







			def 				snake_case__(     self :				List[str]							)      ->Union[str, Any]:
									snake_case_   =	copy.deepcopy(self.__dict__							)
									snake_case_   =	self.encoder.to_dict()
									snake_case_   =	self.decoder.to_dict()
									snake_case_   =	self.__class__.model_type
									return output


from ..utils import DummyObject, requires_backends





class 	snake_case_   (		metaclass=__A					):







			'''simple docstring'''

			SCREAMING_SNAKE_CASE     :   Union[str, Any]									=				["note_seq"]







			def __init__(     self :				Optional[int]							,   *_UpperCamelCase :				str							,   **_UpperCamelCase :				Optional[int]							)      ->Any:
									requires_backends(self							,   ['''note_seq''']							)







			@classmethod
			def 				snake_case__(     cls :				int							,   *_UpperCamelCase :				Any							,   **_UpperCamelCase :				List[Any]							)      ->int:
									requires_backends(cls							,   ['''note_seq''']							)







			@classmethod
			def 				snake_case__(     cls :				Dict							,   *_UpperCamelCase :				Optional[int]							,   **_UpperCamelCase :				Union[str, Any]							)      ->List[str]:
									requires_backends(cls							,   ['''note_seq''']							)