
    Pi                     t    d dl Z d dlmZmZ d dlmZ d dlmZmZm	Z	 ddl
mZ e G d d                      ZdS )	    N)	dataclassfield)Path)AnyOptionalUnion   )configc                       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	d<   dZee         e	d<   dZee	d<   dZeeeef                  e	d<    ee          Zeeef         e	d<   dZee         e	d<   dZee	d<   ddZ fdZ  xZ!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-download 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.
        extract_on_the_fly (`bool`, defaults to `False`):
            If `True`, extract compressed files while they are being read.
        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.
        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`.
        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.
        disable_tqdm (`bool`, defaults to `False`):
            Whether to disable the individual files download progress bar
    N	cache_dirFforce_downloadresume_downloadlocal_files_onlyproxies
user_agentextract_compressed_fileforce_extractdelete_extractedextract_on_the_flyTuse_etagnum_proc   max_retriestoken)default_factorystorage_optionsdownload_descdisable_tqdmreturnc                 ^     | j         di d | j                                        D             S )Nc                 >    i | ]\  }}|t          j        |          S  )copydeepcopy).0kvs      u/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/datasets/download/download_config.py
<dictcomp>z'DownloadConfig.copy.<locals>.<dictcomp>I   s(     W W WADM!$4$4 W W W    r#   )	__class____dict__items)selfs    r)   r$   zDownloadConfig.copyH   s7    t~XX W WATATAVAV W W WXXXr+   c                    |dk    r^t          | dd           Md| j        vrt          j        |d| j        d<   n,t          | j        d         dd           || j        d         d<   t	                                          ||           d S )Nr   r   hf)endpointr   )getattrr   r
   HF_ENDPOINTsuper__setattr__)r/   namevaluer,   s      r)   r6   zDownloadConfig.__setattr__K   s    7??wt->EEQ4///:@:LW\-]-]$T**-d3WdCCK6;$T*73D%(((((r+   )r    r   )"__name__
__module____qualname____doc__r   r   r   strr   __annotations__r   boolr   r   r   dictr   r   r   r   r   r   r   intr   r   r   r   r   r   r   r$   r6   __classcell__)r,   s   @r)   r   r   	   s        ) )V -1Ixc4i()000 ND   !OT!!!"d""""GXd^""" $J$$$$)T)))M4"d"""$$$$Hd"Hhsm"""K(,E8E#t)$%,,,&+eD&A&A&AOT#s(^AAA#'M8C='''L$Y Y Y Y) ) ) ) ) ) ) ) )r+   r   )r$   dataclassesr   r   pathlibr   typingr   r   r    r
   r   r#   r+   r)   <module>rG      s     ( ( ( ( ( ( ( (       ' ' ' ' ' ' ' ' ' '       G) G) G) G) G) G) G) G) G) G)r+   