o
    úÜÓh@  ã                   @   s>   d dl mZ eƒ rddlmZ ddlmZ ddefdd	„Zd
S )é   )Úis_tqdm_availableé    )Útqdmé   )ÚPartialStateTÚmain_process_onlyc                 O   s8   t ƒ stdƒ‚d}| rtƒ jdk}t|i |¤d|i¤ŽS )zÛ
    Wrapper around `tqdm.tqdm` that optionally displays only on the main process.

    Args:
        main_process_only (`bool`, *optional*):
            Whether to display the progress bar only on the main process
    zZAccelerate's `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.Fr   Údisable)r   ÚImportErrorr   Úlocal_process_indexÚ_tqdm)r   ÚargsÚkwargsr   © r   úK/var/www/html/ai/venv/lib/python3.10/site-packages/accelerate/utils/tqdm.pyr      s   r   N)T)Úimportsr   Ú	tqdm.autor   r   Ústater   Úboolr   r   r   r   Ú<module>   s
   