Resource
Resource
Bases: BaseModel
Class that represents a remote resource for downloading and caching test data.
Source code in bionemo/core/data/resource.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
decompress: Literal[False, None] = None
class-attribute
instance-attribute
Whether the resource should be decompressed after download. If None, will defer to the file extension.
description: str | None = None
class-attribute
instance-attribute
A description of the file(s).
ngc: Annotated[str, pydantic.AfterValidator(_validate_ngc_resource)] | None = None
class-attribute
instance-attribute
The NGC URL for the resource.
Should be in format [org/[team/]]name[:version]. If None, the resource is not available on NGC.
ngc_registry: Literal['model', 'resource'] | None = None
class-attribute
instance-attribute
The NGC resource type (model or resource) for the data. Must be provided if ngc is not None.
owner: pydantic.NameEmail
instance-attribute
The owner or primary point of contact for the resource, in the format "Name
pbss: Annotated[pydantic.AnyUrl, pydantic.UrlConstraints(allowed_schemes=[s3])]
instance-attribute
The PBSS (NVIDIA-internal) URL of the resource.
sha256: str | None
instance-attribute
The SHA256 checksum of the resource. If None, the SHA will not be checked on download (not recommended).
tag: Annotated[str, pydantic.StringConstraints(pattern='^[^/]*/[^/]*$')]
instance-attribute
A unique identifier for the resource. The file(s) will be accessible via load("filename/tag").
unpack: Literal[False, None] = None
class-attribute
instance-attribute
Whether the resource should be unpacked after download. If None, will defer to the file extension.
get_all_resources(resource_path=None)
cached
Return a dictionary of all resources.
Source code in bionemo/core/data/resource.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|