How it works?

You can easily install Snark CLI and register an account at Snark Lab.

sudo pip3 install snark

snark login

Define the training process in a mnist.yaml file



experiments:

mnist:

image: pytorch/pytorch:latest

hardware:

gpu: k80

command:

- git clone

- cd examples/mnist

- python main.py version: 1experiments:mnist:image: pytorch/pytorch:latesthardware:gpu: k80command:- git clone https://github.com/pytorch/examples - cd examples/mnist- python main.py

Boom, you are done…

snark up -f mnist.yaml

You have just started an instance, loaded the container equipped with PyTorch, downloaded the source code and started training. Well this will take some time since we are bounded by the speed of light, however for long trainings, a few minutes should not matter.

After scheduling the task, we are able to check the status of the experiment by running snark ps . Once we are happy with the training process, we simply take it down by snark down {experiment_id} to avoid additional charges of machine time.