U
    0È-e@  ã                   @   s>   d dl mZ eƒ rddlmZ ddlmZ dedœdd	„Zd
S )é   )Úis_tqdm_availableé    )Útqdmé   )ÚPartialStateT)Úmain_process_onlyc                 O   s4   t ƒ stdƒ‚d}| r"tƒ jdk}t||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   Zlocal_process_indexÚ_tqdm)r   ÚargsÚkwargsr   © r   úV/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/accelerate/utils/tqdm.pyr      s    r   N)T)Zimportsr   Z	tqdm.autor   r
   Ústater   Úboolr   r   r   r   Ú<module>   s   