Represents a resource to download, extract, or both.
tfds.download.Resource(
*,
url: Optional[str] = None,
extract_method: Optional[tfds.download.ExtractMethod
] = None,
path: Optional[type_utils.PathLike] = None
)
Args |
url
|
str , the URL at which to download the resource.
|
extract_method
|
ExtractMethod to be used to extract resource. If
not set, will be guessed from downloaded file name original_fname .
|
path
|
str , path of resource on local disk. Can be None if resource has
not be downloaded yet. In such case, url must be set.
|
Attributes |
extract_method
|
Returns ExtractMethod to use on resource. Cannot be None.
|
Methods
exists_locally
View source
@classmethod
exists_locally(
path: tfds.core.PathLike
)
Returns whether the resource exists locally, at resource.path
.