What you can log and display#
Neptune supports logging of various types of metadata. The display options in the Neptune app depend on a couple of things:
- The data type and format
- The method you use for logging it to Neptune
This section describes how to log typical model-building metadata.
Model metadata#
- Parameters and model configuration – save single values or organize them in a dictionary structure of your choice.
- Metrics – log metrics and losses as series of values and visualize them as charts.
- Model checkpoints – upload model checkpoint files.
Artifacts and data versioning#
Related
You can generally log metadata about any file with the track_files()
method. This is the handiest way to track and version artifacts that you store elsewhere, such as datasets and model files.
You should only use upload()
for files that you specifically want to view and interact with in Neptune.
Data Version Control (DVC)#
To display DVC files in Neptune, specify which DVC files you would like to log when creating a run.
For example, to log all the DVC files from your working directory and all subdirectories, pass **/*.dvc
to the source_files
argument:
Files#
Related
Upload files – how to generally upload any files from disk.
You can upload and display a variety of file formats.
For details, see:
- Images – how to log images one by one or in series.
- Interactive visualizations – such as Matplotlib figures or Leaflet maps.
- HTML – log from a HTML string object, or upload a file directly.
- Arrays and tensors – log and display as images.
- Tabular data – log and preview CSV or pandas DataFrames.
- Audio and video – log and watch or listen in Neptune.
- Text – how to log text entries in various ways.
Source code#
The following is automatically logged in the source_code
namespace:
entrypoint
: filename of the script you executed, likemain.py
files
: the content of the script you executed
For details, see Source code logging.
Notebook snapshots#
If you're running a Jupyter notebook locally – for example, in Visual Studio Code – you can capture the notebook contents by passing the path of the notebook to the source_code
argument of the init_run()
function.
Neptune can't snapshot the code you execute in cloud environments, such as Google Colab.
For details, see Logging source code.
Git information#
If you have Git initialized in your project directory, Neptune extracts some information from the .git
directory and logs it under the source_code/git
namespace.
For details, see What is logged automatically: Git information.
System metrics#
Neptune logs certain system metrics, such as hardware consumption, automatically.
For details, see System metrics.
Date and time#
You can track dates and times by assigning a Python datetime object to a field of your choice.
from datetime import datetime
# Record exact end of training
run["train/end"] = datetime.now()
# Record when evaluation starterd
run["eval/start"] = datetime.now()
# Other other date metadata
run["dataset/creation_date"] = datetime.fromisoformat("1998-11-01")