资源
资源
基类:BaseModel
表示用于下载和缓存测试数据的远程资源的类。
源代码位于 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
是否应在下载后解压缩资源。如果为 None,将参考文件扩展名。
description: str | None = None
class-attribute
instance-attribute
文件描述。
ngc: Annotated[str, pydantic.AfterValidator(_validate_ngc_resource)] | None = None
class-attribute
instance-attribute
资源的 NGC URL。
应为 [org/[团队/]]名称[:版本] 格式。如果为 None,则资源在 NGC 上不可用。
ngc_registry: Literal['model', 'resource'] | None = None
class-attribute
instance-attribute
数据的 NGC 资源类型(模型或资源)。如果 ngc 不为 None,则必须提供。
owner: pydantic.NameEmail
instance-attribute
资源的拥有者或主要联系人,格式为“姓名
pbss: Annotated[pydantic.AnyUrl, pydantic.UrlConstraints(allowed_schemes=[s3])]
instance-attribute
资源的 PBSS (NVIDIA 内部) URL。
sha256: str | None
instance-attribute
资源的 SHA256 校验和。如果为 None,则下载时将不检查 SHA(不推荐)。
tag: Annotated[str, pydantic.StringConstraints(pattern='^[^/]*/[^/]*$')]
instance-attribute
资源的唯一标识符。文件可以通过 load("filename/tag") 访问。
unpack: Literal[False, None] = None
class-attribute
instance-attribute
是否应在下载后解包资源。如果为 None,将参考文件扩展名。
get_all_resources(resource_path=None)
cached
返回所有资源的字典。
源代码位于 bionemo/core/data/resource.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|