Skip to main content
App version: 3.4.10

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

NameTypeDefaultDescription
filesDict[str, Union[str, Path, bytes, File]]NoneDictionary 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",
}
)