assign_files()
Python package: neptune-scale
Uploads files to Neptune and assigns each file to the specified run attribute.
Pass the metadata as a dictionary {key: value}
, where:
key
– path of the run attribute to which you assign the file.value
– source of the file content.
Parameters
Name | Type | Default | Description |
---|---|---|---|
files | Dict[str, Union[str, Path, bytes, File]] | None | Dictionary of files to log. Binary file-like objects are accepted. To specify the destination path of the file, its MIME type and size, use the File object as a value. |
Overwriting files
Uploading a file to an attribute path that already has an assigned file, overwrites that file.
Example
from neptune_scale import Run
with Run(...) as run:
run.assign_files(
{
"dataset/data_sample": "sample_data.csv",
"dataset/image_sample": "input/images/img1.png",
}
)