from .imports import is_tqdm_available


if is_tqdm_available():
    from tqdm.auto import tqdm as _tqdm

from ..state import PartialState






def  UpperCamelCase__					(					_lowercase    :				bool = True   ,    *_lowercase    :				Dict   ,    **_lowercase    :				Any     )							->	int:






  if not is_tqdm_available():
    raise ImportError("""Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`."""     )
  __UpperCAmelCase:					Tuple		= False
  if main_process_only:
    __UpperCAmelCase:					str		= PartialState().local_process_index == 0
  return _tqdm(*_UpperCamelCase   ,    **_UpperCamelCase   ,    disable=_UpperCamelCase     )
'''simple docstring'''






from ....utils import logging


SCREAMING_SNAKE_CASE_	   =			logging.get_logger(__name__)




class    a (       __lowerCAmelCase				):



  """simple docstring"""







  def __init__(							self   ,    snake_case_   ,    snake_case_=None   ,    snake_case_=2048					):

    '''simple docstring'''







    __UpperCAmelCase:					List[str]		= config.__dict__
    __UpperCAmelCase:					str		= modal_hidden_size
    if num_labels:
      __UpperCAmelCase:					int		= num_labels