
"""simple docstring"""







import copy
from typing import TYPE_CHECKING, Any, Mapping, Optional, OrderedDict

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig


if TYPE_CHECKING:
						from ... import PreTrainedTokenizerBase, TensorType

lowerCamelCase__        =		logging.get_logger(__name__)




class 			A__	(     _SCREAMING_SNAKE_CASE):
		A_						:	Dict           =     'vision-encoder-decoder'
		A_						:	Dict           =     True

		def __init__(				self	,		**_SCREAMING_SNAKE_CASE			):
			super().__init__(**_SCREAMING_SNAKE_CASE			)
			if "encoder" not in kwargs or "decoder" not in kwargs:
				raise ValueError(
				    f"A configuraton of type {self.model_type} cannot be instantiated because "
				    f"not both `encoder` and `decoder` sub-configurations are passed, but only {kwargs}"			)

			__lowerCAmelCase      :						Dict						      =				kwargs.pop('encoder'			)
			__lowerCAmelCase      :						Tuple						      =				encoder_config.pop('model_type'			)
			__lowerCAmelCase      :						Dict						      =				kwargs.pop('decoder'			)
			__lowerCAmelCase      :						List[Any]						      =				decoder_config.pop('model_type'			)

			__lowerCAmelCase      :						List[Any]						      =				AutoConfig.for_model(_SCREAMING_SNAKE_CASE	,		**_SCREAMING_SNAKE_CASE			)
			__lowerCAmelCase      :						List[Any]						      =				AutoConfig.for_model(_SCREAMING_SNAKE_CASE	,		**_SCREAMING_SNAKE_CASE			)
			__lowerCAmelCase      :						Optional[Any]						      =				True

		@classmethod
		def 							__lowerCamelCase							(				cls	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		**_SCREAMING_SNAKE_CASE			):
			logger.info('Setting `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config'			)
			__lowerCAmelCase      :						Dict						      =				True
			__lowerCAmelCase      :						List[str]						      =				True

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







		def 							__lowerCamelCase							(				self			):
			__lowerCAmelCase      :						Dict						      =				copy.deepcopy(self.__dict__			)
			__lowerCAmelCase      :						List[Any]						      =				self.encoder.to_dict()
			__lowerCAmelCase      :						Dict						      =				self.decoder.to_dict()
			__lowerCAmelCase      :						int						      =				self.__class__.model_type
			return output




class 			A__	(     _SCREAMING_SNAKE_CASE):
		A_						:	Optional[int]           =     version.parse('1.11')

		@property
		def 							__lowerCamelCase							(				self			):
			return OrderedDict(
			    [
			        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
			    ]			)

		@property
		def 							__lowerCamelCase							(				self			):
			return 1E-4







		@property
		def 							__lowerCamelCase							(				self			):
			return OrderedDict({'last_hidden_state': {0: 'batch', 1: 'encoder_sequence'}}			)




class 			A__	(     _SCREAMING_SNAKE_CASE):

		@property
		def 							__lowerCamelCase							(				self			):
			__lowerCAmelCase      :						Union[str, Any]						      =				OrderedDict()
			__lowerCAmelCase      :						List[Any]						      =				{0: 'batch', 1: 'past_decoder_sequence + sequence'}
			__lowerCAmelCase      :						List[Any]						      =				{0: 'batch', 1: 'past_decoder_sequence + sequence'}
			__lowerCAmelCase      :						Dict						      =				{0: 'batch', 1: 'encoder_sequence'}

			return common_inputs







		def 							__lowerCamelCase							(				self	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE = -1	,		_SCREAMING_SNAKE_CASE = -1	,		_SCREAMING_SNAKE_CASE = False	,		_SCREAMING_SNAKE_CASE = None	,		):
			import torch

			__lowerCAmelCase      :						List[str]						      =				OrderedDict()

			__lowerCAmelCase      :						Any						      =				super().generate_dummy_inputs(
			    _SCREAMING_SNAKE_CASE	,		batch_size=_SCREAMING_SNAKE_CASE	,		seq_length=_SCREAMING_SNAKE_CASE	,		is_pair=_SCREAMING_SNAKE_CASE	,		framework=_SCREAMING_SNAKE_CASE			)

			__lowerCAmelCase      ,       __lowerCAmelCase      :						List[Any]						      =				dummy_input['input_ids'].shape
			__lowerCAmelCase      :						Union[str, Any]						      =				(batch, encoder_sequence, self._config.encoder_hidden_size)
			__lowerCAmelCase      :						Optional[Any]						      =				dummy_input.pop('input_ids'			)
			__lowerCAmelCase      :						Optional[int]						      =				dummy_input.pop('attention_mask'			)
			__lowerCAmelCase      :						List[Any]						      =				torch.zeros(_SCREAMING_SNAKE_CASE			)

			return common_inputs




class 			A__	(     _SCREAMING_SNAKE_CASE):

		@property
		def 							__lowerCamelCase							(				self			):
			pass

		def 							__lowerCamelCase							(				self	,		_SCREAMING_SNAKE_CASE			):
			return VisionEncoderDecoderEncoderOnnxConfig(_SCREAMING_SNAKE_CASE			)







		def 							__lowerCamelCase							(				self	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE = "default"			):
			__lowerCAmelCase      :						Any						      =				encoder_config.hidden_size
			return VisionEncoderDecoderDecoderOnnxConfig(_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE			)

"""simple docstring"""







import argparse
import datetime
def    __lowerCAmelCase    (_UpperCamelCase		):
	__lowerCAmelCase      :						Optional[Any]						      =				{
	    '0': 'Sunday',
	    '1': 'Monday',
	    '2': 'Tuesday',
	    '3': 'Wednesday',
	    '4': 'Thursday',
	    '5': 'Friday',
	    '6': 'Saturday',
	}

	__lowerCAmelCase      :						Optional[Any]						      =				{0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0}

	# Validate
	if not 0 < len(_UpperCamelCase		) < 11:
		raise ValueError('Must be 10 characters long'		)

	# Get month
	__lowerCAmelCase      :						int						      =				int(date_input[0] + date_input[1]		)
	# Validate
	if not 0 < m < 13:
		raise ValueError('Month must be between 1 - 12'		)

	__lowerCAmelCase      :						str						      =				date_input[2]
	# Validate
	if sep_a not in ["-", "/"]:
		raise ValueError('Date separator must be \'-\' or \'/\''		)

	# Get day
	__lowerCAmelCase      :						int						      =				int(date_input[3] + date_input[4]		)
	# Validate
	if not 0 < d < 32:
		raise ValueError('Date must be between 1 - 31'		)

	# Get second separator
	__lowerCAmelCase      :						str						      =				date_input[5]
	# Validate
	if sep_a not in ["-", "/"]:
		raise ValueError('Date separator must be \'-\' or \'/\''		)

	# Get year
	__lowerCAmelCase      :						int						      =				int(date_input[6] + date_input[7] + date_input[8] + date_input[9]		)
	# Arbitrary year range
	if not 45 < y < 8500:
		raise ValueError(
		    'Year out of range. There has to be some sort of limit...right?'		)

	# Get datetime obj for validation
	__lowerCAmelCase      :						Tuple						      =				datetime.date(int(_UpperCamelCase		)	,  int(_UpperCamelCase		)	,  int(_UpperCamelCase		)		)

	# Start math
	if m <= 2:
		__lowerCAmelCase      :						int						      =				y - 1
		__lowerCAmelCase      :						Tuple						      =				m + 12
	# maths var
	__lowerCAmelCase      :						int						      =				int(str(_UpperCamelCase		)[:2]		)
	__lowerCAmelCase      :						int						      =				int(str(_UpperCamelCase		)[2:]		)
	__lowerCAmelCase      :						int						      =				int(2.6 * m - 5.39		)
	__lowerCAmelCase      :						int						      =				int(c / 4		)
	__lowerCAmelCase      :						int						      =				int(k / 4		)
	__lowerCAmelCase      :						int						      =				int(d + k		)
	__lowerCAmelCase      :						int						      =				int(t + u + v + x		)
	__lowerCAmelCase      :						int						      =				int(z - (2 * c)		)
	__lowerCAmelCase      :						int						      =				round(w % 7		)
	# End math

	# Validate math
	if f != convert_datetime_days[dt_ck.weekday()]:
		raise AssertionError('The date was evaluated incorrectly. Contact developer.'		)

	# Response
	__lowerCAmelCase      :						str						      =				F"Your date {date_input}, is a {days[str(_UpperCamelCase		)]}!"
	return response


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							lowerCamelCase__        =		argparse.ArgumentParser(
							    description=(
							        """Find out what day of the week nearly any date is or was. Enter """
							        """date as a string in the mm-dd-yyyy or mm/dd/yyyy format"""
							    )
							)
							parser.add_argument(
							    """date_input""", type=str, help="""Date as a string (mm-dd-yyyy or mm/dd/yyyy)"""
							)
							lowerCamelCase__        =		parser.parse_args()
							zeller(args.date_input)