

'''simple docstring'''

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

import _pytest

from transformers.testing_utils import HfDoctestModule, HfDocTestParser


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
lowercase__			    =			abspath(join(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       UpperCamelCase(     UpperCAmelCase_	):
 config.addinivalue_line(
     'markers'  ,       'is_pt_tf_cross_test: mark test to run only when PT and TF interactions are tested'	)
 config.addinivalue_line(
     'markers'  ,       'is_pt_flax_cross_test: mark test to run only when PT and FLAX interactions are tested'	)
 config.addinivalue_line('markers'  ,       'is_pipeline_test: mark test to run only when pipelines are tested'	)
 config.addinivalue_line('markers'  ,       'is_staging_test: mark test to run only in the staging environment'	)
 config.addinivalue_line('markers'  ,       'accelerate_tests: mark test that require accelerate'	)
 config.addinivalue_line('markers'  ,       'tool_tests: mark the tool tests that are run on their specific schedule'	)




def       UpperCamelCase(     UpperCAmelCase_	):
 from transformers.testing_utils import pytest_addoption_shared

 pytest_addoption_shared(_SCREAMING_SNAKE_CASE	)




def       UpperCamelCase(     UpperCAmelCase_	):
 from transformers.testing_utils import pytest_terminal_summary_main

 UpperCAmelCase       :	Optional[int]											= terminalreporter.config.getoption('--make-reports'	)
 if make_reports:
  pytest_terminal_summary_main(_SCREAMING_SNAKE_CASE  ,       id=_SCREAMING_SNAKE_CASE	)




def       UpperCamelCase(     UpperCAmelCase_  ,       UpperCAmelCase_	):
 # If no tests are collected, pytest exists with code 5, which makes the CI fail.
 if exitstatus == 5:
  UpperCAmelCase       :	Optional[int]											= 0


# Doctest custom flag to ignore output.
lowercase__			    =			doctest.register_optionflag("IGNORE_RESULT")

lowercase__			    =			doctest.OutputChecker




class        A_ (				__lowerCAmelCase							):






     '''simple docstring'''



     def    UpperCAmelCase_       (		self :     Optional[Any]     ,			lowercase_ :     Union[str, Any]     ,			lowercase_ :     Optional[int]     ,			lowercase_ :     Any       )						->	Optional[int]:





      if IGNORE_RESULT & optionflags:
       return True
      return OutputChecker.check_output(self     ,			lowercase_     ,			lowercase_     ,			lowercase_       )



lowercase__			    =			CustomOutputChecker
lowercase__			    =			HfDoctestModule




lowercase__			    =			HfDocTestParser





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


lowercase__					       =	logging.get_logger(__name__)

lowercase__					       =	{
    'MIT/ast-finetuned-audioset-10-10-0.4593': (
        'https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json'
    ),
}




class    __snake_case       (     __lowerCAmelCase				):
      a__        =		"""audio-spectrogram-transformer"""



      def __init__(						self    ,			lowercase=7_68    ,			lowercase=12    ,			lowercase=12    ,			lowercase=30_72    ,			lowercase="gelu"    ,			lowercase=0.0    ,			lowercase=0.0    ,			lowercase=0.02    ,			lowercase=1e-12    ,			lowercase=16    ,			lowercase=True    ,			lowercase=10    ,			lowercase=10    ,			lowercase=10_24    ,			lowercase=1_28    ,			**lowercase    ,			)	->			str:





        '''simple docstring'''





        super().__init__(**lowercase)

        a__:     Any										=	hidden_size
        a__:     int										=	num_hidden_layers
        a__:     Union[str, Any]										=	num_attention_heads
        a__:     Any										=	intermediate_size
        a__:     Union[str, Any]										=	hidden_act
        a__:     int										=	hidden_dropout_prob
        a__:     str										=	attention_probs_dropout_prob
        a__:     str										=	initializer_range
        a__:     Tuple										=	layer_norm_eps
        a__:     Any										=	patch_size
        a__:     int										=	qkv_bias
        a__:     Optional[Any]										=	frequency_stride
        a__:     int										=	time_stride
        a__:     List[str]										=	max_length
        a__:     Tuple										=	num_mel_bins


