





import pytest

import datasets


# Import fixture modules as plugins
lowerCAmelCase_						   =    ["""tests.fixtures.files""", """tests.fixtures.hub""", """tests.fixtures.fsspec"""]


def     lowerCamelCase_	(      lowerCAmelCase:	List[str]    ,							lowerCAmelCase:	List[str]				)->		int:
  # Mark tests as "unit" by default if not marked as "integration" (or already marked as "unit")
  for item in items:
    if any(marker in item.keywords for marker in ['integration', 'unit']				):
      continue
    item.add_marker(pytest.mark.unit				)


def     lowerCamelCase_	(      lowerCAmelCase:	Union[str, Any]				)->		Union[str, Any]:
  config.addinivalue_line('markers'    ,							'torchaudio_latest: mark test to run with torchaudio>=0.12'				)


@pytest.fixture(autouse=lowerCAmelCase				)
def     lowerCamelCase_	(      lowerCAmelCase:	List[Any]    ,							lowerCAmelCase:	Optional[Any]				)->		Any:
  # test_hf_cache_home = tmp_path_factory.mktemp("cache")  # TODO: why a cache dir per test function does not work?
  _snake_case   :				Optional[int]														=	tmp_path_factory.getbasetemp() / 'cache'
  _snake_case   :				Dict														=	test_hf_cache_home / 'datasets'
  _snake_case   :				List[Any]														=	test_hf_cache_home / 'metrics'
  _snake_case   :				Dict														=	test_hf_cache_home / 'modules'
  monkeypatch.setattr('datasets.config.HF_DATASETS_CACHE'    ,							str(lowerCAmelCase				)				)
  monkeypatch.setattr('datasets.config.HF_METRICS_CACHE'    ,							str(lowerCAmelCase				)				)
  monkeypatch.setattr('datasets.config.HF_MODULES_CACHE'    ,							str(lowerCAmelCase				)				)
  _snake_case   :				Optional[int]														=	test_hf_datasets_cache / 'downloads'
  monkeypatch.setattr('datasets.config.DOWNLOADED_DATASETS_PATH'    ,							str(lowerCAmelCase				)				)
  _snake_case   :				Optional[Any]														=	test_hf_datasets_cache / 'downloads' / 'extracted'
  monkeypatch.setattr('datasets.config.EXTRACTED_DATASETS_PATH'    ,							str(lowerCAmelCase				)				)


@pytest.fixture(autouse=lowerCAmelCase    ,							scope='session'				)
def     lowerCamelCase_	(      )->		Union[str, Any]:
  datasets.disable_progress_bar()


@pytest.fixture(autouse=lowerCAmelCase				)
def     lowerCamelCase_	(      lowerCAmelCase:	Optional[int]				)->		Optional[Any]:
  # don't take tests into account when counting downloads
  monkeypatch.setattr('datasets.config.HF_UPDATE_DOWNLOAD_COUNTS'    ,							lowerCAmelCase				)







@pytest.fixture
def     lowerCamelCase_	(      lowerCAmelCase:	int				)->		Union[str, Any]:
  # Required to suppress RemovedIn20Warning when feature(s) are not compatible with SQLAlchemy 2.0
  # To be removed once SQLAlchemy 2.0 supported
  monkeypatch.setattr('sqlalchemy.util.deprecations.SILENCE_UBER_WARNING'    ,							lowerCAmelCase				)











from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase_						   =    logging.get_logger(__name__)

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



class        _lowerCAmelCase    (			UpperCAmelCase_							):


  '''simple docstring'''
  a_							:       Tuple      					="""audio-spectrogram-transformer"""







  def __init__(      self      :					List[Any]      ,				UpperCamelCase      :					Union[str, Any]=7_68      ,				UpperCamelCase      :					int=12      ,				UpperCamelCase      :					str=12      ,				UpperCamelCase      :					Tuple=30_72      ,				UpperCamelCase      :					Optional[Any]="gelu"      ,				UpperCamelCase      :					Any=0.0      ,				UpperCamelCase      :					Dict=0.0      ,				UpperCamelCase      :					List[Any]=0.02      ,				UpperCamelCase      :					Dict=1e-1_2      ,				UpperCamelCase      :					str=16      ,				UpperCamelCase      :					List[Any]=True      ,				UpperCamelCase      :					Any=10      ,				UpperCamelCase      :					Optional[int]=10      ,				UpperCamelCase      :					int=10_24      ,				UpperCamelCase      :					Optional[Any]=1_28      ,				**UpperCamelCase      :					Optional[Any]      ,				):


    '''simple docstring'''





    super().__init__(**UpperCamelCase							)

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




