Hello Gradient Descent
Estimated time: 5 minutes
In this part of our introduction you will learn how to:
- transform your logs into interactive charts;
- send your computation to the cloud.
git clone https://github.com/neptune-ml/neptune-examples.git cd neptune-examples/1-hello-gradient-descent
main.py script minimizes a function f(x) with the gradient descent algorithm.
To run it with Neptune on your own computer, execute:
A dashboard tracking the progress of the experiment will open in your browser. Logs defined within the code appear in your terminal:
1 2 3 4 5
neptune run # ... # x 1.4 y -10.64 # x 2.52 y -21.9296 # x 3.416 y -29.154944
This mini-project contains a short config file
log-channels: [x, y]
It’s a way of telling Neptune that it should treat strings like “x 3.14” and “y 2.71” printed to standard output specially - they should be converted to numeric channels.
Each channel is a sequence of numeric values, strings or images - which can be used to observe the progress of your machine learning model training. Neptune lets you view numeric channels as interactive charts.
You can experiment a bit with this feature by printing additional variables to the terminal,
like the function’s gradient:
df. Once you edit the code accordingly, you can configure
your channels from command line:
neptune run -l x -l y -l df
Also, you can run exactly the same script in the cloud. It is as simple as:
neptune send -l x -l y -l df
Your experiment will now be executed on Google Cloud Platform and you can monitor its progress, as usual in Neptune’s UI.
Now let’s learn how to use Jupyter notebooks for your experiments in Neptune.