Jupyter Lab and Jupyter Notebook

You can execute your runs in Jupyter notebooks and track them in Neptune. You just need to:

  • In one of the first cells install Neptune client

! pip install neptune-client
  • Create Neptune run

import neptune.new as neptune
run = neptune.init(project='my_workspace/my_project')

To make sure that you set up API token.

# Track metadata and hyperparameters of your run
run["JIRA"] = "NPT-952"
run["algorithm"] = "ConvNet"
params = {
"batch_size": 64,
"dropout": 0.2,
"learning_rate": 0.001,
"optimizer": "Adam"
}
run["parameters"] = params
# Track the training process by logging your training metrics
for epoch in range(100):
run["train/accuracy"].log(epoch * 0.6)
run["train/loss"].log(epoch * 0.4)
# Log the final score
run["f1_score"] = 0.66

Neptune-Jupyter notebooks integration

Neptune supports keeping track of Jupyter Notebook checkpoints with neptune-notebooks extension. If you do that, your notebook checkpoints will get an auto-snapshot whenever you create a run. Go here to read more about that.