o
    n’×i*  ã                   @  sn   d Z ddlmZ ddlmZmZ ddlmZmZ er,ddl	m
Z
 ddlmZ ddlmZ dZG d	d
„ d
ƒZdS )zStorage handler.é    )Úannotations)ÚTYPE_CHECKINGÚSequence)ÚFilePathStrÚURIStr)ÚParseResult)ÚArtifact)ÚArtifactManifestEntryi€–˜ c                   @  s6   e Zd Zddd„Z	dddd„Z			dddd„ZdS ) ÚStorageHandlerÚ
parsed_urlr   ÚreturnÚboolc                 C  ó   t ‚)z‹Checks whether this handler can handle the given url.

        Returns:
            Whether this handler can handle the given url.
        ©ÚNotImplementedError)Úselfr   © r   úa/home/ubuntu/SoloSpeech/.venv/lib/python3.10/site-packages/wandb/sdk/artifacts/storage_handler.pyÚ
can_handle   s   zStorageHandler.can_handleFÚmanifest_entryr	   ÚlocalúURIStr | FilePathStrc                 C  r   )a  Load a file or directory given the corresponding index entry.

        Args:
            manifest_entry: The index entry to load
            local: Whether to load the file locally or not

        Returns:
            A path to the file represented by `index_entry`
        r   )r   r   r   r   r   r   Ú	load_path   s   zStorageHandler.load_pathNTÚartifactr   ÚpathÚnameú
str | NoneÚchecksumÚmax_objectsú
int | NoneúSequence[ArtifactManifestEntry]c                 C  r   )a§  Store the file or directory at the given path to the specified artifact.

        Args:
            path: The path to store
            name: If specified, the logical name that should map to `path`
            checksum: Whether to compute the checksum of the file
            max_objects: The maximum number of objects to store

        Returns:
            A list of manifest entries to store within the artifact
        r   )r   r   r   r   r   r   r   r   r   Ú
store_path+   s   zStorageHandler.store_path)r   r   r   r   )F)r   r	   r   r   r   r   )NTN)r   r   r   r   r   r   r   r   r   r   r   r    )Ú__name__Ú
__module__Ú__qualname__r   r   r!   r   r   r   r   r
      s    
ýúr
   N)Ú__doc__Ú
__future__r   Útypingr   r   Úwandb.sdk.lib.pathsr   r   Úurllib.parser   Úwandb.sdk.artifacts.artifactr   Ú+wandb.sdk.artifacts.artifact_manifest_entryr	   ÚDEFAULT_MAX_OBJECTSr
   r   r   r   r   Ú<module>   s    