


import operator as op


snake_case_						:			Union[str, Any]													=							'''scaler.pt'''
snake_case_						:			Dict													=							'''pytorch_model'''
snake_case_						:			List[Any]													=							'''random_states'''
snake_case_						:			Optional[int]													=							'''optimizer'''
snake_case_						:			Union[str, Any]													=							'''scheduler'''
snake_case_						:			Any													=							'''pytorch_model.bin'''
snake_case_						:			List[str]													=							'''pytorch_model.bin.index.json'''
snake_case_						:			List[str]													=							'''model.safetensors'''
snake_case_						:			List[Any]													=							'''model.safetensors.index.json'''
snake_case_						:			List[str]													=							'''1.10.2'''
snake_case_						:			Union[str, Any]													=							'''py38'''
snake_case_						:			Tuple													=							'''4.17.0'''
snake_case_						:			List[Any]													=							['''ml.p3.16xlarge''', '''ml.p3dn.24xlarge''', '''ml.p4dn.24xlarge''']
snake_case_						:			Dict													=							['''FULL_SHARD''', '''SHARD_GRAD_OP''', '''NO_SHARD''', '''HYBRID_SHARD''', '''HYBRID_SHARD_ZERO2''']
snake_case_						:			int													=							['''TRANSFORMER_BASED_WRAP''', '''SIZE_BASED_WRAP''', '''NO_WRAP''']
snake_case_						:			Optional[int]													=							['''BACKWARD_PRE''', '''BACKWARD_POST''', '''NO_PREFETCH''']
snake_case_						:			Any													=							['''FULL_STATE_DICT''', '''LOCAL_STATE_DICT''', '''SHARDED_STATE_DICT''']
snake_case_						:			Union[str, Any]													=							'''2.0.1'''
snake_case_						:			List[str]													=							['''pdsh''', '''standard''', '''openmpi''', '''mvapich''']
snake_case_						:			List[str]													=							['''default''', '''reduce-overhead''', '''max-autotune''']

snake_case_						:			int													=							{'''>''': op.gt, '''>=''': op.ge, '''==''': op.eq, '''!=''': op.ne, '''<=''': op.le, '''<''': op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
snake_case_						:			Tuple													=							[
    '''nnodes''',
    '''nproc_per_node''',
    '''rdzv_backend''',
    '''rdzv_endpoint''',
    '''rdzv_id''',
    '''rdzv_conf''',
    '''standalone''',
    '''max_restarts''',
    '''monitor_interval''',
    '''start_method''',
    '''role''',
    '''module''',
    '''m''',
    '''no_python''',
    '''run_path''',
    '''log_dir''',
    '''r''',
    '''redirects''',
    '''t''',
    '''tee''',
    '''node_rank''',
    '''master_addr''',
    '''master_port''',
]

snake_case_						:			Optional[int]													=							['''DEEPSPEED''', '''MULTI_GPU''', '''FSDP''', '''MEGATRON_LM''']
snake_case_						:			List[str]													=							['''DEEPSPEED''', '''MULTI_XPU''', '''FSDP''']



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_speech_available, is_torch_available


snake_case_						:			Optional[Any]													=							{
    '''configuration_audio_spectrogram_transformer''': [
        '''AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''ASTConfig''',
    ]
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							snake_case_						:			Optional[Any]													=							[
							    '''AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''ASTForAudioClassification''',
							    '''ASTModel''',
							    '''ASTPreTrainedModel''',
							]

try:
							if not is_speech_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							snake_case_						:			List[Any]													=							['''ASTFeatureExtractor''']

if TYPE_CHECKING:
							from .configuration_audio_spectrogram_transformer import (
							    AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    ASTConfig,
							)

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_audio_spectrogram_transformer import (
														    AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    ASTForAudioClassification,
														    ASTModel,
														    ASTPreTrainedModel,
														)

							try:
														if not is_speech_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_audio_spectrogram_transformer import ASTFeatureExtractor


else:
							import sys

							snake_case_						:			Optional[Any]													=							_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)