log_files()
Python package: neptune-scale
Appends a file value and uploads the file contents at a particular step.
Pass the data as a dictionary {key: value}
with:
key
: path to the attribute where the series is stored in the run.value
: a file value to append to the series.
The files are uploaded to the Neptune object storage and the attributes are set to point to the uploaded files.
Parameters
files
Dict[str, str | Path | bytes | File]
required
default: 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.
step
float | int
required
default: None
Index of the log entry.
Tip: Use float rather than int values when logging substeps in a batch.
timestamp
datetime
optional
default: None
Time of logging the metadata. If not provided, the current time is used. If provided, and timestamp.tzinfo
is not set, the time is assumed to be in the local timezone.
Example
from neptune_scale import Run
run = Run(...)
# for step in training loop
run.log_files(
files={"predictions/train": "output/train/predictions.png"},
step=1,
)