


'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


__snake_case											=					logging.get_logger(__name__)

__snake_case											=					{
    '''naver-clova-ix/donut-base''': '''https://huggingface.co/naver-clova-ix/donut-base/resolve/main/config.json''',
    # See all Donut models at https://huggingface.co/models?filter=donut-swin
}
class        lowercase     (							A__ ):

		"""simple docstring"""

		_a   			=    'donut-swin'

		_a   			=    {
		    'num_attention_heads': 'num_heads',
		    'num_hidden_layers': 'num_layers',
		}




		def __init__(		self   ,       UpperCamelCase_=224   ,       UpperCamelCase_=4   ,       UpperCamelCase_=3   ,       UpperCamelCase_=96   ,       UpperCamelCase_=[2, 2, 6, 2]   ,       UpperCamelCase_=[3, 6, 12, 24]   ,       UpperCamelCase_=7   ,       UpperCamelCase_=4.0   ,       UpperCamelCase_=True   ,       UpperCamelCase_=0.0   ,       UpperCamelCase_=0.0   ,       UpperCamelCase_=0.1   ,       UpperCamelCase_="gelu"   ,       UpperCamelCase_=False   ,       UpperCamelCase_=0.02   ,       UpperCamelCase_=1e-5   ,       **UpperCamelCase_   ,       ):

							'''simple docstring'''


							super().__init__(**UpperCamelCase_							)

							UpperCamelCase__       :Tuple							 =			image_size
							UpperCamelCase__       :int							 =			patch_size
							UpperCamelCase__       :int							 =			num_channels
							UpperCamelCase__       :int							 =			embed_dim
							UpperCamelCase__       :int							 =			depths
							UpperCamelCase__       :Optional[int]							 =			len(UpperCamelCase_							)
							UpperCamelCase__       :Optional[Any]							 =			num_heads
							UpperCamelCase__       :Dict							 =			window_size
							UpperCamelCase__       :List[str]							 =			mlp_ratio
							UpperCamelCase__       :Tuple							 =			qkv_bias
							UpperCamelCase__       :Tuple							 =			hidden_dropout_prob
							UpperCamelCase__       :Dict							 =			attention_probs_dropout_prob
							UpperCamelCase__       :str							 =			drop_path_rate
							UpperCamelCase__       :str							 =			hidden_act
							UpperCamelCase__       :List[Any]							 =			use_absolute_embeddings
							UpperCamelCase__       :str							 =			layer_norm_eps
							UpperCamelCase__       :List[Any]							 =			initializer_range
							# we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
							# this indicates the channel dimension after the last stage of the model
							UpperCamelCase__       :str							 =			int(embed_dim * 2 ** (len(UpperCamelCase_							) - 1)							)



'''simple docstring'''
# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
__snake_case											=					abspath(join(dirname(dirname(__file__)), '''src'''))
sys.path.insert(1, git_repo_path)

# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action='''ignore''', category=FutureWarning)


def       a				(      __a       )  ->     Optional[int]:



					'''simple docstring'''






					from diffusers.utils.testing_utils import pytest_addoption_shared

					pytest_addoption_shared(__a       )







def       a				(      __a       )  ->     str:



					'''simple docstring'''






					from diffusers.utils.testing_utils import pytest_terminal_summary_main

					UpperCamelCase__       :Union[str, Any]							 =			terminalreporter.config.getoption('''--make-reports'''       )
					if make_reports:
										pytest_terminal_summary_main(__a			, id=__a       )