Skip to content

Logging parameters and model configuration#

You can define a namespace for storing any parameters or hyperparameters. Assign the values one by one, or define a dictionary of values.

run["parameters/epoch_nr"] = 5
run["parameters/batch_size"] = 32
run["parameters/dense"] = 512
run["parameters/optimizer"] = "sgd"
run["parameters/metrics"] = ["accuracy", "mae"]
run["parameters/activation"] = "ReLU"
params = {
    "epoch_nr": 5,
    "batch_size": 32,
    "dense": 512,
    "optimizer": "sgd",
    "metrics": ["accuracy", "binary_accuracy"],
    "activation": "ReLU",
run["parameters"] = params
import argparse

argparser = argparse.ArgumentParser()
argparser.add_argument("--lr", default=0.01)
argparser.add_argument("--batch", default=32)
argparser.add_argument("--activation", default="ReLU")

args = argparser.parse_args()
run["parameters"] = args

Or, using Namespace():

from argparse import Namespace

args = Namespace(

args = argparser.parse_args()
run["parameters"] = args

In each of the above, the parameters are stored in a namespace called "parameters". Inside that namespace, a field is created for each parameter.

You'll find your logged parameters in the All metadata section of the run.

See in Neptune 


You can also display parameters in the runs table and custom dashboards.