This tutorial demonstrates how to use NNI (an open-source tool from Microsoft) for Hyperparameter Tuning on Neu.ro. You will create a new Neu.ro project, integrate it with NNI and run multiple tuning workers to speed up search process.
Make sure you have Neu.ro CLI installed.
To create a new Neu.ro project, run:
neuro project initcd <project-slug>
Then, add the following lines to
# Required for Hyper-parameter searchnni==1.5# Required by Neu.ro NNI integration scriptsJinja2>=2.11.2aiodns>=2.0.0
We are now ready to build our image:
While Docker builds our image we can continue setting up NNI integration:
Put nni.mk to the root of your project and add the following line at the end of
This will add some new make targets and overwrite existing ones to work with NNI.
make setup completes, your project is ready for running on Neu.ro.
The only thing left is to run
This command will:
Run 3 worker nodes with
gpu-small preset. Both parameters can be configured via
PRESET parameters respectfully.
Run master node with
Auto-generate NNI configuration file for the master node pointing at the workers.
Run the training process and open NNI web interface in your browser automatically.
From the web UI you can track experiment progress and intermediate results. When the workers are done, you can get final hyperparameter values and download the logs if needed.
Once you're done you can shutdown both the workers and the master node via: