� ���g��n�dZddlZddlZddlmZmZmZmZmZmZm Z m Z ddl m Z ddl mZmZmZm Z ejejej ejejd�Zej Zd�Zd efd �Zd ejfd �Zdd �Zdd �Zdde ed ejfd�Zd efd�Zded dfd�Zd�Zd�Zd�Z d�Z!dd�Z"dd�Z#e��dS)zLogging utilities.�N)�CRITICAL�DEBUG�ERROR�FATAL�INFO�NOTSET�WARN�WARNING)�Optional�)�disable_progress_bar�enable_progress_bar�is_progress_bar_enabled�tqdm)�debug�info�warning�error�criticalc ��tjdd��}|rl|tvr t|Stj���d|�dd�t���������tS)z� If DATASETS_VERBOSITY env var is set to one of the valid choices return that as the new default level. If it is not - fall back to ``_default_log_level`` �DATASETS_VERBOSITYNz"Unknown option DATASETS_VERBOSITY=z, has to be one of: z, ) �os�getenv� log_levels�logging� getLoggerr�join�keys�_default_log_level)� env_level_strs �f/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/datasets/utils/logging.py�_get_default_logging_levelr"1s��� �I�2�D�9�9�M��� �J� &� &��m�,� ,� � � � � '� '�v�]�v�v�X\�Xa�Xa�bl�bq�bq�bs�bs�Xt�Xt�v�v� � � � ���returnc�B�t�d��dS)N�.r)�__name__�split�r#r!�_get_library_namer*As�� �>�>�#� � �q� !�!r#c�B�tjt����S�N)rrr*r)r#r!�_get_library_root_loggerr-Es�� � �.�0�0� 1� 1�1r#c��t��}|�tj����|�t ����dSr,)r-� addHandlerr� StreamHandler�setLevelr"��library_root_loggers r!�_configure_library_root_loggerr4IsL��2�4�4���"�"�7�#8�#:�#:�;�;�;�� � �!;�!=�!=�>�>�>�>�>r#c�`�t��}|�tj��dSr,)r-r1rrr2s r!�_reset_library_root_loggerr6Ps*��2�4�4��� � ���0�0�0�0�0r#�namec�J�|�t��}tj|��S)z_Return a logger with the specified name. This function can be used in dataset scripts. )r*rr)r7s r!� get_loggerr9Us%�� �|� �"�"�� � �T� "� "�"r#c�B�t�����S)a�Return the current level for the HuggingFace datasets library's root logger. Returns: Logging level, e.g., `datasets.logging.DEBUG` and `datasets.logging.INFO`. <Tip> HuggingFace datasets library has following logging levels: - `datasets.logging.CRITICAL`, `datasets.logging.FATAL` - `datasets.logging.ERROR` - `datasets.logging.WARNING`, `datasets.logging.WARN` - `datasets.logging.INFO` - `datasets.logging.DEBUG` </Tip> )r-�getEffectiveLevelr)r#r!� get_verbosityr<^s�� $� %� %� 7� 7� 9� 9�9r#� verbosityc�H�t���|��dS)z�Set the level for the Hugging Face Datasets library's root logger. Args: verbosity: Logging level, e.g., `datasets.logging.DEBUG` and `datasets.logging.INFO`. N)r-r1)r=s r!� set_verbosityr?qs$�� ���'�'� �2�2�2�2�2r#c�*�tt��S)z�Set the level for the Hugging Face datasets library's root logger to `INFO`. This will display most of the logging information and tqdm bars. Shortcut to `datasets.logging.set_verbosity(datasets.logging.INFO)`. )r?rr)r#r!�set_verbosity_inforAzs�� �� � �r#c�*�tt��S)z�Set the level for the Hugging Face datasets library's root logger to `WARNING`. This will display only the warning and errors logging information and tqdm bars. Shortcut to `datasets.logging.set_verbosity(datasets.logging.WARNING)`. )r?r r)r#r!�set_verbosity_warningrC�s�� �� !� !�!r#c�*�tt��S)z�Set the level for the Hugging Face datasets library's root logger to `DEBUG`. This will display all the logging information and tqdm bars. Shortcut to `datasets.logging.set_verbosity(datasets.logging.DEBUG)`. )r?rr)r#r!�set_verbosity_debugrE���� �� � �r#c�*�tt��S)z�Set the level for the Hugging Face datasets library's root logger to `ERROR`. This will display only the errors logging information and tqdm bars. Shortcut to `datasets.logging.set_verbosity(datasets.logging.ERROR)`. )r?rr)r#r!�set_verbosity_errorrH�rFr#c�,�dt��_dS)zjDisable propagation of the library log outputs. Note that log propagation is disabled by default. FN�r-� propagater)r#r!�disable_propagationrL�s��,1����(�(�(r#c�,�dt��_dS)z�Enable propagation of the library log outputs. Please disable the Hugging Face datasets library's default handler to prevent double logging if the root logger has been configured. TNrJr)r#r!�enable_propagationrN�s�� ,0����(�(�(r#)r$Nr,)$�__doc__rrrrrrrrr r �typingr rr rrrrr"�strr*�Loggerr-r4r6r9�intr<r?rArCrErHrLrNr)r#r!�<module>rTsY�������� � � � � � � � � � � � � � � � � � � � � � � � ��������������������]� �L��� �]�� � �� ��_�� � � � "�3�"�"�"�"�2�'�.�2�2�2�2�?�?�?�?�1�1�1�1� #�#�X�c�]�#�g�n�#�#�#�#�:�s�:�:�:�:�&3�S�3�T�3�3�3�3����"�"�"� � � � � � �1�1�1�1�0�0�0�0��� � � � � r#
Memory