
    9i@                     D    d dl mZ  e       rddlmZ ddlmZ d	defdZy)
   )is_tqdm_available    )tqdm   )PartialStatemain_process_onlyc                     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
   s       _/var/www/html/backtest/airagagent/rag_env/lib/python3.12/site-packages/accelerate/utils/tqdm.pyr   r      sE     vwwG.449$2&2'22    N)T)importsr   	tqdm.autor   r   stater   bool r   r   <module>r      s$    ' '  3D 3r   