

# 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.
UpperCamelCase__		   =    abspath(join(dirname(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 	lowerCamelCase__			(   __A						:List[str]		):


       """simple docstring"""




       from diffusers.utils.testing_utils import pytest_addoption_shared

       pytest_addoption_shared(__A		)







def 	lowerCamelCase__			(   __A						:Optional[Any]		):


       """simple docstring"""




       from diffusers.utils.testing_utils import pytest_terminal_summary_main

       __snake_case					  =       terminalreporter.config.getoption("""--make-reports"""		)
       if make_reports:
              pytest_terminal_summary_main(__A  ,id=__A		)




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


UpperCamelCase__		   =    logging.get_logger(__name__)

UpperCamelCase__		   =    {
    '''apple/mobilevitv2-1.0''': '''https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json''',
}

class 						__snake_case						(							snake_case__     ):
       """simple docstring"""







       __SCREAMING_SNAKE_CASE													=       "mobilevitv2"


       def __init__(		self			,   _UpperCamelCase=3			,   _UpperCamelCase=2_56			,   _UpperCamelCase=2			,   _UpperCamelCase=2.0			,   _UpperCamelCase="swish"			,   _UpperCamelCase=3			,   _UpperCamelCase=32			,   _UpperCamelCase=0.1			,   _UpperCamelCase=0.02			,   _UpperCamelCase=1E-5			,   _UpperCamelCase=5_12			,   _UpperCamelCase=[6, 12, 18]			,   _UpperCamelCase=0.1			,   _UpperCamelCase=2_55			,   _UpperCamelCase=[2, 4, 3]			,   _UpperCamelCase=[1_28, 1_92, 2_56]			,   _UpperCamelCase=1.0			,   _UpperCamelCase=2			,   _UpperCamelCase=0.0			,   _UpperCamelCase=0.0			,   **_UpperCamelCase			,   )			->       List[Any]:






              """simple docstring"""


              super().__init__(**_UpperCamelCase      )

              __snake_case					  =       num_channels
              __snake_case					  =       image_size
              __snake_case					  =       patch_size
              __snake_case					  =       expand_ratio
              __snake_case					  =       hidden_act
              __snake_case					  =       conv_kernel_size
              __snake_case					  =       output_stride
              __snake_case					  =       initializer_range
              __snake_case					  =       layer_norm_eps
              __snake_case					  =       n_attn_blocks
              __snake_case					  =       base_attn_unit_dims
              __snake_case					  =       width_multiplier
              __snake_case					  =       ffn_multiplier
              __snake_case					  =       ffn_dropout
              __snake_case					  =       attn_dropout
              __snake_case					  =       classifier_dropout_prob

              # decode head attributes for semantic segmentation
              __snake_case					  =       aspp_out_channels
              __snake_case					  =       atrous_rates
              __snake_case					  =       aspp_dropout_prob
              __snake_case					  =       semantic_loss_ignore_index






class 						__snake_case						(							snake_case__     ):
       """simple docstring"""







       __SCREAMING_SNAKE_CASE													=       version.parse("1.11"     )


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






              """simple docstring"""


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


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






              """simple docstring"""


              if self.task == "image-classification":
                     return OrderedDict([("""logits""", {0: """batch"""})]      )
              else:
                     return OrderedDict([("""last_hidden_state""", {0: """batch"""}), ("""pooler_output""", {0: """batch"""})]      )






       @property
       def  a		(		self      )			->       float:






              """simple docstring"""


              return 1E-4

