

class 				UpperCAmelCase_		:
							"""simple docstring"""







							def __init__(			self       ,							_a       )    ->    List[str]:
												_a	:    int         =		n
												_a	:    Union[str, Any]         =		[None] * self.n
												_a	:    Dict         =		0  # index of the first element
												_a	:    Dict         =		0
												_a	:    Union[str, Any]         =		0


							def __len__(			self       )    ->    int:
												return self.size


							def 				__lowercase				(			self       )    ->    bool:
												return self.size == 0


							def 				__lowercase				(			self       )    ->    Tuple:
												return False if self.is_empty() else self.array[self.front]


							def 				__lowercase				(			self       ,							_a       )    ->    Any:
												if self.size >= self.n:
																	raise Exception('''QUEUE IS FULL'''       )

												_a	:    str         =		data
												_a	:    Union[str, Any]         =		(self.rear + 1) % self.n
												self.size += 1
												return self




							def 				__lowercase				(			self       )    ->    Optional[int]:
												if self.size == 0:
																	raise Exception('''UNDERFLOW'''       )

												_a	:    List[Any]         =		self.array[self.front]
												_a	:    Optional[int]         =		None
												_a	:    int         =		(self.front + 1) % self.n
												self.size -= 1
												return temp






import operator as op


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

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

# These are the args for `torch.distributed.launch` for pytorch < 1.9
a__				=		[
    '''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''',
]

a__				=		['''DEEPSPEED''', '''MULTI_GPU''', '''FSDP''', '''MEGATRON_LM''']
a__				=		['''DEEPSPEED''', '''MULTI_XPU''', '''FSDP''']



