



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


a_								=    logging.get_logger(__name__)

a_								=    {
    """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__      ):
 lowerCAmelCase__				    =     """audio-spectrogram-transformer"""




 def __init__(  self		, __UpperCAmelCase=768		, __UpperCAmelCase=12		, __UpperCAmelCase=12		, __UpperCAmelCase=3072		, __UpperCAmelCase="gelu"		, __UpperCAmelCase=0.0		, __UpperCAmelCase=0.0		, __UpperCAmelCase=0.02		, __UpperCAmelCase=1E-1_2		, __UpperCAmelCase=16		, __UpperCAmelCase=True		, __UpperCAmelCase=10		, __UpperCAmelCase=10		, __UpperCAmelCase=1024		, __UpperCAmelCase=128		, **__UpperCAmelCase		, ):



    '''simple docstring'''
    super().__init__(**__lowercase )

    __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










import platform
from argparse import ArgumentParser

import huggingface_hub

from .. import __version__ as version
from ..utils import is_accelerate_available, is_torch_available, is_transformers_available, is_xformers_available
from . import BaseDiffusersCLICommand



def 	lowerCAmelCase       (						lowerCAmelCase_       )->       Union[str, Any]:
				return EnvironmentCommand()







class  snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						@staticmethod
						def   lowercase_       ( __lowercase							)    ->			List[Any]:
										lowerCAmelCase_       :					List[str]			 = parser.add_parser('''env'''							)
										download_parser.set_defaults(func=__lowercase							)




						def   lowercase_       ( self							)    ->			int:
										lowerCAmelCase_       :					Optional[Any]			 = huggingface_hub.__version__

										lowerCAmelCase_       :					str			 = '''not installed'''
										lowerCAmelCase_       :					str			 = '''NA'''
										if is_torch_available():
														import torch

														lowerCAmelCase_       :					Any			 = torch.__version__
														lowerCAmelCase_       :					str			 = torch.cuda.is_available()

										lowerCAmelCase_       :					List[str]			 = '''not installed'''
										if is_transformers_available():
														import transformers

														lowerCAmelCase_       :					Any			 = transformers.__version__

										lowerCAmelCase_       :					Optional[Any]			 = '''not installed'''
										if is_accelerate_available():
														import accelerate

														lowerCAmelCase_       :					List[Any]			 = accelerate.__version__

										lowerCAmelCase_       :					List[str]			 = '''not installed'''
										if is_xformers_available():
														import xformers

														lowerCAmelCase_       :					Optional[Any]			 = xformers.__version__

										lowerCAmelCase_       :					int			 = {
										    '''`diffusers` version''': version,
										    '''Platform''': platform.platform(),
										    '''Python version''': platform.python_version(),
										    '''PyTorch version (GPU?)''': f"""{pt_version} ({pt_cuda_available})""",
										    '''Huggingface_hub version''': hub_version,
										    '''Transformers version''': transformers_version,
										    '''Accelerate version''': accelerate_version,
										    '''xFormers version''': xformers_version,
										    '''Using GPU in script?''': '''<fill in>''',
										    '''Using distributed or parallel set-up in script?''': '''<fill in>''',
										}

										print('''\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\n'''							)
										print(self.format_dict(__lowercase							)							)

										return info




						@staticmethod
						def   lowercase_       ( __lowercase							)    ->			str:
										return "\n".join([f"""- {prop}: {val}""" for prop, val in d.items()]							) + "\n"