�
%�gy � �P � d dl mZ e� � rddlmZ ddlmZ dd�defd �Zd
S )� )�is_tqdm_available� )�tqdm� )�PartialStateT)�main_process_onlyr c �8 � t � � st d� � �t |� � dk r*t |d t � � rt d� � �|� dd� � }| r|st � � j dk }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`.r z�Passing `True` or `False` as the first argument to Accelerate's `tqdm` wrapper is unsupported. Please use the `main_process_only` keyword argument instead.�disableF)
r �ImportError�len�
isinstance�bool�
ValueError�popr �local_process_index�_tqdm)r �args�kwargsr
s �e/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/accelerate/utils/tqdm.pyr r s� � � ��� x��v�w�w�w�
�4�y�y�1�}�}��D��G�T�2�2�}��
K�
�
�
� �j�j��E�*�*�G�� :�� :��.�.�4��9���$�2�&�2�2�'�2�2�2�2� N)�importsr � tqdm.autor r �stater r � r r �<module>r s� �� '� &� &� &� &� &� ���� (�'�'�'�'�'�'� � � � � � � +/� 3� 3� 3�4� 3� 3� 3� 3� 3� 3r