


"""simple docstring"""
from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


SCREAMING_SNAKE_CASE :    Dict									=				logging.get_logger(__name__)

SCREAMING_SNAKE_CASE :    Optional[int]									=				{
    """hustvl/yolos-small""": """https://huggingface.co/hustvl/yolos-small/resolve/main/config.json""",
    # See all YOLOS models at https://huggingface.co/models?filter=yolos
}



class 			_UpperCAmelCase (							__snake_case				):






		'''simple docstring'''

		lowerCamelCase__				='yolos'



		def __init__(self				,       a_=7_68				,       a_=12				,       a_=12				,       a_=30_72				,       a_="gelu"				,       a_=0.0				,       a_=0.0				,       a_=0.02				,       a_=1E-12				,       a_=[5_12, 8_64]				,       a_=16				,       a_=3				,       a_=True				,       a_=1_00				,       a_=True				,       a_=False				,       a_=1				,       a_=5				,       a_=2				,       a_=5				,       a_=2				,       a_=0.1				,       **a_				,       ):





			'''simple docstring'''

			super().__init__(**a_					)

			__snake_case	:						Union[str, Any]						=				hidden_size
			__snake_case	:						Union[str, Any]						=				num_hidden_layers
			__snake_case	:						Dict						=				num_attention_heads
			__snake_case	:						str						=				intermediate_size
			__snake_case	:						List[str]						=				hidden_act
			__snake_case	:						Tuple						=				hidden_dropout_prob
			__snake_case	:						Optional[int]						=				attention_probs_dropout_prob
			__snake_case	:						Union[str, Any]						=				initializer_range
			__snake_case	:						Tuple						=				layer_norm_eps
			__snake_case	:						List[Any]						=				image_size
			__snake_case	:						Tuple						=				patch_size
			__snake_case	:						str						=				num_channels
			__snake_case	:						Tuple						=				qkv_bias
			__snake_case	:						Union[str, Any]						=				num_detection_tokens
			__snake_case	:						List[str]						=				use_mid_position_embeddings
			__snake_case	:						Tuple						=				auxiliary_loss
			# Hungarian matcher
			__snake_case	:						List[str]						=				class_cost
			__snake_case	:						int						=				bbox_cost
			__snake_case	:						int						=				giou_cost
			# Loss coefficients
			__snake_case	:						Optional[int]						=				bbox_loss_coefficient
			__snake_case	:						List[str]						=				giou_loss_coefficient
			__snake_case	:						List[Any]						=				eos_coefficient



class 			_UpperCAmelCase (							__snake_case				):






		'''simple docstring'''

		lowerCamelCase__				=version.parse('1.11'				)



		@property
		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

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



		@property
		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			return 1E-4



		@property
		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			return 12









"""simple docstring"""
import pytest

import datasets


# Import fixture modules as plugins
SCREAMING_SNAKE_CASE :    List[Any]									=				["""tests.fixtures.files""", """tests.fixtures.hub""", """tests.fixtures.fsspec"""]






def 		lowercase							(     _snake_case						:      Optional[int]     ,   _snake_case						:      Optional[int]     )     ->Tuple:
	"""simple docstring"""





	for item in items:
		if any(marker in item.keywords for marker in ['''integration''', '''unit''']     ):
			continue
		item.add_marker(pytest.mark.unit     )






def 		lowercase							(     _snake_case						:      List[str]     )     ->Optional[int]:
	"""simple docstring"""





	config.addinivalue_line('''markers'''     ,   '''torchaudio_latest: mark test to run with torchaudio>=0.12'''     )






@pytest.fixture(autouse=_snake_case     )
def 		lowercase							(     _snake_case						:      Optional[Any]     ,   _snake_case						:      Dict     )     ->Any:
	"""simple docstring"""





	__snake_case	:						List[Any]						=				tmp_path_factory.getbasetemp() / '''cache'''
	__snake_case	:						int						=				test_hf_cache_home / '''datasets'''
	__snake_case	:						Tuple						=				test_hf_cache_home / '''metrics'''
	__snake_case	:						List[str]						=				test_hf_cache_home / '''modules'''
	monkeypatch.setattr('''datasets.config.HF_DATASETS_CACHE'''     ,   str(_snake_case     )     )
	monkeypatch.setattr('''datasets.config.HF_METRICS_CACHE'''     ,   str(_snake_case     )     )
	monkeypatch.setattr('''datasets.config.HF_MODULES_CACHE'''     ,   str(_snake_case     )     )
	__snake_case	:						Optional[int]						=				test_hf_datasets_cache / '''downloads'''
	monkeypatch.setattr('''datasets.config.DOWNLOADED_DATASETS_PATH'''     ,   str(_snake_case     )     )
	__snake_case	:						Tuple						=				test_hf_datasets_cache / '''downloads''' / '''extracted'''
	monkeypatch.setattr('''datasets.config.EXTRACTED_DATASETS_PATH'''     ,   str(_snake_case     )     )






@pytest.fixture(autouse=_snake_case     ,   scope='''session'''     )
def 		lowercase							(     )     ->Any:
	"""simple docstring"""





	datasets.disable_progress_bar()






@pytest.fixture(autouse=_snake_case     )
def 		lowercase							(     _snake_case						:      Tuple     )     ->Union[str, Any]:
	"""simple docstring"""





	monkeypatch.setattr('''datasets.config.HF_UPDATE_DOWNLOAD_COUNTS'''     ,   _snake_case     )






@pytest.fixture
def 		lowercase							(     _snake_case						:      Any     )     ->Optional[Any]:
	"""simple docstring"""





	monkeypatch.setattr('''sqlalchemy.util.deprecations.SILENCE_UBER_WARNING'''     ,   _snake_case     )





