You can execute your runs in any environment and log them to Neptune. There are just two things you need to do:
install neptune-client,
add metadata tracking to your code-base.
Depending on your operating system open a terminal or CMD and run this command:
pip install neptune-client
conda install -c conda-forge neptune-client
import neptune.new as neptune​run = neptune.init(project='common/quickstarts',api_token='ANONYMOUS')​# Track metadata and hyperparameters of your runrun["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 metricsfor epoch in range(100):run["train/accuracy"].log(epoch * 0.6)run["train/loss"].log(epoch * 0.4)​# Log the final resultsrun["f1_score"] = 0.66
If you are not using Python don’t worry. Read how to:
​use Neptune client for R​
Instead of passing api_token
directly to neptune.init()
you can use environment variables:
NEPTUNE_API_TOKEN
: where you put your Neptune API token:
NEPTUNE_API_TOKEN='YOUR_API_TOKEN'
It is recommended to keep your API token in the environment variable for security reasons. Learn more:
NEPTUNE_PROJECT
: where you put your project name
NEPTUNE_PROJECT='YOUR_PROJECT_NAME'
Remember that project has two parts 'my_workspace/my_project'
for example 'neptune-ai/credit-default-prediction'
.