
    +gd                     d    d dl Z d dlmZ d dlmZ d dlmZmZmZ e G d d                      Z	dS )    N)	dataclass)Path)DictOptionalUnionc                   p   e Zd ZU dZdZeeeef                  e	d<   dZ
ee	d<   dZee	d<   dZee	d<   dZee         e	d<   dZee         e	d	<   dZee	d
<   dZee	d<   dZee	d<   dZee	d<   dZee         e	d<   dZee	d<   dZeeeef                  e	d<   dZee	d<   dZee         e	d<   dZee         e	d<   ddZdS )DownloadConfiga"	  Configuration for our cached path manager.

    Attributes:
        cache_dir (`str` or `Path`, *optional*):
            Specify a cache directory to save the file to (overwrite the
            default cache dir).
        force_download (`bool`, defaults to `False`):
            If `True`, re-dowload the file even if it's already cached in
            the cache dir.
        resume_download (`bool`, defaults to `False`):
            If `True`, resume the download if an incompletely received file is
            found.
        proxies (`dict`, *optional*):
        user_agent (`str`, *optional*):
            Optional string or dict that will be appended to the user-agent on remote
            requests.
        extract_compressed_file (`bool`, defaults to `False`):
            If `True` and the path point to a zip or tar file,
            extract the compressed file in a folder along the archive.
        force_extract (`bool`, defaults to `False`):
            If `True` when `extract_compressed_file` is `True` and the archive
            was already extracted, re-extract the archive and override the folder where it was extracted.
        delete_extracted (`bool`, defaults to `False`):
            Whether to delete (or keep) the extracted files.
        use_etag (`bool`, defaults to `True`):
            Whether to use the ETag HTTP response header to validate the cached files.
        num_proc (`int`, *optional*):
            The number of processes to launch to download the files in parallel.
        max_retries (`int`, default to `1`):
            The number of times to retry an HTTP request if it fails.
        use_auth_token (`str` or `bool`, *optional*):
            Optional string or boolean to use as Bearer token
            for remote files on the Datasets Hub. If `True`, or not specified, will get token from `~/.huggingface`.
        ignore_url_params (`bool`, defaults to `False`):
            Whether to strip all query parameters and fragments from
            the download URL before using it for caching the file.
        storage_options (`dict`, *optional*):
            Key/value pairs to be passed on to the dataset file-system backend, if any.
        download_desc (`str`, *optional*):
            A description to be displayed alongside with the progress bar while downloading the files.
    N	cache_dirFforce_downloadresume_downloadlocal_files_onlyproxies
user_agentextract_compressed_fileforce_extractdelete_extractedTuse_etagnum_proc   max_retriesuse_auth_tokenignore_url_paramsstorage_optionsdownload_descreturnc                 ^     | j         di d | j                                        D             S )Nc                 >    i | ]\  }}|t          j        |          S  )copydeepcopy).0kvs      Alib/python3.11/site-packages/datasets/download/download_config.py
<dictcomp>z'DownloadConfig.copy.<locals>.<dictcomp>E   s(     W W WADM!$4$4 W W W    r   )	__class____dict__items)selfs    r$   r   zDownloadConfig.copyD   s7    t~XX W WATATAVAV W W WXXXr&   )r   r	   )__name__
__module____qualname____doc__r
   r   r   strr   __annotations__r   boolr   r   r   r   r   r   r   r   r   r   intr   r   r   r   r   r   r   r&   r$   r	   r	      sq        ( (T -1Ixc4i()000 ND   !OT!!!"d""""GXd^""" $J$$$$)T)))M4"d"""Hd"Hhsm"""K15NHU39-.555#t###&*OXd^***#'M8C='''Y Y Y Y Y Yr&   r	   )
r   dataclassesr   pathlibr   typingr   r   r   r	   r   r&   r$   <module>r6      s     ! ! ! ! ! !       ( ( ( ( ( ( ( ( ( ( =Y =Y =Y =Y =Y =Y =Y =Y =Y =Yr&   