




'''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


_snake_case : Optional[int]  				=						logging.get_logger(__name__)

_snake_case : str  				=						{
    '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      A       (						_a       ):
							lowercase_							     =							'yolos'







							def __init__(    self			:    int				,     lowerCAmelCase_			:    Dict=7_68				,     lowerCAmelCase_			:    List[Any]=12				,     lowerCAmelCase_			:    str=12				,     lowerCAmelCase_			:    Any=30_72				,     lowerCAmelCase_			:    Any="gelu"				,     lowerCAmelCase_			:    List[str]=0.0				,     lowerCAmelCase_			:    Optional[Any]=0.0				,     lowerCAmelCase_			:    Any=0.0_2				,     lowerCAmelCase_			:    Any=1e-12				,     lowerCAmelCase_			:    Any=[5_12, 8_64]				,     lowerCAmelCase_			:    Dict=16				,     lowerCAmelCase_			:    int=3				,     lowerCAmelCase_			:    Union[str, Any]=True				,     lowerCAmelCase_			:    Union[str, Any]=1_00				,     lowerCAmelCase_			:    Optional[Any]=True				,     lowerCAmelCase_			:    Optional[Any]=False				,     lowerCAmelCase_			:    Tuple=1				,     lowerCAmelCase_			:    List[Any]=5				,     lowerCAmelCase_			:    Union[str, Any]=2				,     lowerCAmelCase_			:    List[str]=5				,     lowerCAmelCase_			:    Dict=2				,     lowerCAmelCase_			:    Optional[Any]=0.1				,     **lowerCAmelCase_			:    Optional[Any]				,     )     ->				Any:


														"""simple docstring"""


														super().__init__(**lowerCAmelCase_   )

														_a      	=							hidden_size
														_a      	=							num_hidden_layers
														_a      	=							num_attention_heads
														_a      	=							intermediate_size
														_a      	=							hidden_act
														_a      	=							hidden_dropout_prob
														_a      	=							attention_probs_dropout_prob
														_a      	=							initializer_range
														_a      	=							layer_norm_eps
														_a      	=							image_size
														_a      	=							patch_size
														_a      	=							num_channels
														_a      	=							qkv_bias
														_a      	=							num_detection_tokens
														_a      	=							use_mid_position_embeddings
														_a      	=							auxiliary_loss
														# Hungarian matcher
														_a      	=							class_cost
														_a      	=							bbox_cost
														_a      	=							giou_cost
														# Loss coefficients
														_a      	=							bbox_loss_coefficient
														_a      	=							giou_loss_coefficient
														_a      	=							eos_coefficient



class      A       (						_a       ):
							lowercase_							     =							version.parse('1.11'       )







							@property
							def   __lowerCAmelCase     (    self			:    Any   )     ->				Mapping[str, Mapping[int, str]]:


														"""simple docstring"""


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







							@property
							def   __lowerCAmelCase     (    self			:    Tuple   )     ->				float:


														"""simple docstring"""


														return 1e-4







							@property
							def   __lowerCAmelCase     (    self			:    Tuple   )     ->				int:


														"""simple docstring"""


														return 12







'''simple docstring'''


import requests
def 						snake_case_       (UpperCamelCase			:    str					,		UpperCamelCase			:    str ):





							'''simple docstring'''


							_a      	=							{'''Content-Type''': '''application/json'''}
							_a      	=							requests.post(UpperCamelCase					,		json={'''text''': message_body}					,		headers=UpperCamelCase )
							if response.status_code != 200:
														_a      	=							(
														    '''Request to slack returned an error '''
														    f'{response.status_code}, the response is:\n{response.text}'
														)
														raise ValueError(UpperCamelCase )


if __name__ == "__main__":
				# Set the slack url to the one provided by Slack when you create the webhook at
				# https://my.slack.com/services/new/incoming-webhook/
				send_slack_message('<YOUR MESSAGE BODY>', '<SLACK CHANNEL URL>')

