




"""simple docstring"""




import logging
import os
from logging import (
    CRITICAL,  # NOQA
    DEBUG,  # NOQA
    ERROR,  # NOQA
    FATAL,  # NOQA
    INFO,  # NOQA
    NOTSET,  # NOQA
    WARN,  # NOQA
    WARNING,  # NOQA
)
from typing import Optional

from tqdm import auto as tqdm_lib


lowerCAmelCase							:    Optional[Any]  							=							{
    """debug""": logging.DEBUG,
    """info""": logging.INFO,
    """warning""": logging.WARNING,
    """error""": logging.ERROR,
    """critical""": logging.CRITICAL,
}

lowerCAmelCase							:    List[str]  							=							logging.WARNING



def 					a__				(       )		->      List[str]:
			lowerCamelCase       =      os.getenv("""DATASETS_VERBOSITY""" ,				snake_case__       )
			if env_level_str:
						if env_level_str in log_levels:
									return log_levels[env_level_str]
						else:
									logging.getLogger().warning(
									    F'Unknown option DATASETS_VERBOSITY={env_level_str}, '
									    F'has to be one of: { ", ".join(log_levels.keys()       ) }'       )
			return _default_log_level



def 					a__				(       )		->      str:
			return __name__.split("""."""       )[0]



def 					a__				(       )		->      logging.Logger:
			return logging.getLogger(_get_library_name()       )



def 					a__				(       )		->      None:
			# Apply our default configuration to the library root logger.
			lowerCamelCase       =      _get_library_root_logger()
			library_root_logger.setLevel(_get_default_logging_level()       )



def 					a__				(       )		->      None:
			lowerCamelCase       =      _get_library_root_logger()
			library_root_logger.setLevel(logging.NOTSET       )



def 					a__				(       snake_case__ = None       )		->      logging.Logger:
			if name is None:
						lowerCamelCase       =      _get_library_name()
			return logging.getLogger(snake_case__       )



def 					a__				(       )		->      int:
			return _get_library_root_logger().getEffectiveLevel()



def 					a__				(       snake_case__       )		->      None:
			_get_library_root_logger().setLevel(snake_case__       )



def 					a__				(       )		->      List[str]:
			return set_verbosity(snake_case__       )



def 					a__				(       )		->      Optional[int]:
			return set_verbosity(snake_case__       )



def 					a__				(       )		->      Optional[int]:
			return set_verbosity(snake_case__       )



def 					a__				(       )		->      Dict:
			return set_verbosity(snake_case__       )



def 					a__				(       )		->      None:
			lowerCamelCase       =      False



def 					a__				(       )		->      None:
			lowerCamelCase       =      True


# Configure the library root logger at the module level (singleton-like)
_configure_library_root_logger()






class 					__magic_name__							:






				'''simple docstring'''





				def __init__( self	,				*_a	,				**_a				):  # pylint: disable=unused-argument





							"""simple docstring"""
							lowerCamelCase       =      args[0] if args else None





				def __iter__( self				):





							"""simple docstring"""
							return iter(self._iterator				)





				def __getattr__( self	,				_a				):





							"""simple docstring"""

							def empty_fn(*_a	,				**_a				):  # pylint: disable=unused-argument
										return

							return empty_fn





				def __enter__( self				):





							"""simple docstring"""
							return self





				def __exit__( self	,				_a	,				_a	,				_a				):





							"""simple docstring"""
							return




lowerCAmelCase							:    int  							=							True






class 					__magic_name__							:






				'''simple docstring'''





				def __call__( self	,				*_a	,				_a=False	,				**_a				):





							"""simple docstring"""
							if _tqdm_active and not disable:
										return tqdm_lib.tqdm(*_a	,				**_a				)
							else:
										return EmptyTqdm(*_a	,				**_a				)





				def      _lowerCAmelCase       ( self	,				*_a	,				**_a				):





							"""simple docstring"""
							lowerCamelCase       =      None
							if _tqdm_active:
										return tqdm_lib.tqdm.set_lock(*_a	,				**_a				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							if _tqdm_active:
										return tqdm_lib.tqdm.get_lock()




lowerCAmelCase							:    Union[str, Any]  							=							_tqdm_cls()



def 					a__				(       )		->      bool:
			global _tqdm_active
			return bool(_tqdm_active       )



def 					a__				(       )		->      Tuple:
			global _tqdm_active
			lowerCamelCase       =      True



def 					a__				(       )		->      str:
			global _tqdm_active
			lowerCamelCase       =      False









"""simple docstring"""




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


lowerCAmelCase							:    Dict  							=							logging.get_logger(__name__)

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






class 					__magic_name__							( UpperCAmelCase__       ):






				'''simple docstring'''
				__UpperCamelCase    						=		"audio-spectrogram-transformer"





				def __init__( self	,				_a=768	,				_a=12	,				_a=12	,				_a=3_072	,				_a="gelu"	,				_a=0.0	,				_a=0.0	,				_a=0.02	,				_a=1e-1_2	,				_a=16	,				_a=True	,				_a=10	,				_a=10	,				_a=1_024	,				_a=128	,				**_a	,				):





							"""simple docstring"""
							super().__init__(**_a				)

							lowerCamelCase       =      hidden_size
							lowerCamelCase       =      num_hidden_layers
							lowerCamelCase       =      num_attention_heads
							lowerCamelCase       =      intermediate_size
							lowerCamelCase       =      hidden_act
							lowerCamelCase       =      hidden_dropout_prob
							lowerCamelCase       =      attention_probs_dropout_prob
							lowerCamelCase       =      initializer_range
							lowerCamelCase       =      layer_norm_eps
							lowerCamelCase       =      patch_size
							lowerCamelCase       =      qkv_bias
							lowerCamelCase       =      frequency_stride
							lowerCamelCase       =      time_stride
							lowerCamelCase       =      max_length
							lowerCamelCase       =      num_mel_bins



