� ���gY��L�ddlmZmZmZddlmZddlmZddlm Z ddl m Z m Z m Z Gd�de��ZGd �d e��ZGd �d ee��ZGd �de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�d e��ZGd!�d"e��ZGd#�d$e��ZGd%�d&e��ZGd'�d(e��Z Gd)�d*e��Z!d+S),�)�Any�Optional�Union)� HfFileSystem�)�config)� CastError)�TrackedIterableFromGenerator� tracked_list� tracked_strc��eZdZdZdS)� DatasetsErrorz*Base class for exceptions in this library.N��__name__� __module__� __qualname__�__doc__���c/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/datasets/exceptions.pyrr s������4�4�4�4rrc��eZdZdZdS)�DefunctDatasetErrorzThe dataset has been defunct.Nrrrrrrs������'�'�'�'rrc��eZdZdZdS)�FileNotFoundDatasetsErrorz)FileNotFoundError raised by this library.Nrrrrrr�������3�3�3�3rrc��eZdZdZdS)�DataFilesNotFoundErrorz No (supported) data files found.Nrrrrrrs������*�*�*�*rrc��eZdZdZdS)�DatasetNotFoundErrorz�Dataset not found. Raised when trying to access: - a missing dataset, or - a private/gated dataset and the user is not authenticated. Nrrrrrrs���������rrc��eZdZdS)�DatasetBuildErrorN�rrrrrrr!r!%��������Drr!c��eZdZdS)�ManualDownloadErrorNr"rrrr%r%)r#rr%c��eZdZdS)�FileFormatErrorNr"rrrr'r'-r#rr'c��eZdZdS)�DatasetGenerationErrorNr"rrrr)r)1r#rr)c �f�eZdZedededeeefdee e efddf d���Z dS)�DatasetGenerationCastError� cast_error� builder_name� gen_kwargs�token�returnc��d|�����}g}|���D�]d}t|ttt f��s�&t|tt f��r1|j�*|j}t|tt f��r|j�*t|t��r|���}t|t��r�|� d��r|ttj |���� |��}d|���z}d|jz|vr+|�d|jzdd��d|j�d�z}|�t|������f|r|d |�d d �|����z }d } |d |z| z��S)NzC All the data files must have the same columns, but at some point zhf://)�endpointr/�@�rz (at revision �)z This happened while the z, dataset builder was generating data using z, z� Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)z.An error occurred while generating the dataset)�details�values� isinstancer r r � last_item� get_origin�str� startswithrr� HF_ENDPOINT� resolve_path� unresolve�revision�replace�append�join) �clsr,r-r.r/�explanation_message�formatted_tracked_gen_kwargs� gen_kwarg� resolved_path� help_messages r�from_cast_errorz*DatasetGenerationCastError.from_cast_error6s&�� k�T^�Tf�Tf�Th�Th� j� j� �35�$�#�*�*�,�,� @� @�I��i�+�|�Ea�)b�c�c� ���9�|�5Q�&R�S�S� 0�Xa�Xk�Xw�%�/� ��9�|�5Q�&R�S�S� 0�Xa�Xk�Xw��)�[�1�1� 3�%�0�0�2�2� ��)�S�)�)� �i�.B�.B�7�.K�.K� � ,�f�6H�PU� V� V� V� c� c�dm� n� n� �#�m�&=�&=�&?�&?�?� ���/�/�9�<�<�!�)�)�#� �0F�*F��A�N�N�D�=�+A�D�D�D�E�� )� /� /��I��� ?� ?� ?� ?� '� h� �$h�,�$h�$h�C�H�H�Ie�f�f�$h�$h� h� �c� ��s�C�FY�Y�\h�h�i�i�irN) rrr� classmethodr r;�dictrrr�boolrJrrrr+r+5s�������� j�� j�� j���c��N� j� ��d�C�i�(�)� j� &� j� j� j��[� j� j� jrr+c��eZdZdZdS)�ChecksumVerificationErrorz@Error raised during checksums verifications of downloaded files.NrrrrrOrOZs������J�J�J�JrrOc��eZdZdZdS)�UnexpectedDownloadedFileErrorz(Some downloaded files were not expected.NrrrrrQrQ^s������2�2�2�2rrQc��eZdZdZdS)� ExpectedMoreDownloadedFilesErrorz7Some files were supposed to be downloaded but were not.NrrrrrSrSb�������A�A�A�ArrSc��eZdZdZdS)�NonMatchingChecksumErrorz?The downloaded file checksum don't match the expected checksum.NrrrrrVrVfs������I�I�I�IrrVc��eZdZdZdS)�SplitsVerificationErrorz)Error raised during splits verifications.NrrrrrXrXjrrrXc��eZdZdZdS)�UnexpectedSplitsErrorz6The expected splits of the downloaded file is missing.NrrrrrZrZns������@�@�@�@rrZc��eZdZdZdS)�ExpectedMoreSplitsErrorz!Some recorded splits are missing.Nrrrrr\r\rs������+�+�+�+rr\c��eZdZdZdS)�NonMatchingSplitsSizesErrorz7The splits sizes don't match the expected splits sizes.Nrrrrr^r^vrTrr^N)"�typingrrr�huggingface_hubrr4r�tabler � utils.trackr r r � Exceptionrr�FileNotFoundErrorrrrr!r%r'r)r+rOrQrSrVrXrZr\r^rrr�<module>res���(�'�'�'�'�'�'�'�'�'�(�(�(�(�(�(�������������P�P�P�P�P�P�P�P�P�P�5�5�5�5�5�I�5�5�5�(�(�(�(�(�-�(�(�(�4�4�4�4�4� �/@�4�4�4�+�+�+�+�+�6�+�+�+������4���� � � � � � � � � � � � � � �+� � � � � � � � �'� � � � � � � � �.� � � �"j�"j�"j�"j�"j�!7�"j�"j�"j�JK�K�K�K�K� �K�K�K�3�3�3�3�3�$=�3�3�3�B�B�B�B�B�'@�B�B�B�J�J�J�J�J�8�J�J�J�4�4�4�4�4�m�4�4�4�A�A�A�A�A�3�A�A�A�,�,�,�,�,�5�,�,�,�B�B�B�B�B�"9�B�B�B�B�Br
Memory