Introduction

Zetane offers the possibility to train a model on a remote machine and make snapshot which can be reviewed on a local instance of Zetane at a later time.

The Context must be turned to remote zetane.context(remote=True). This launches Zetane without the visuals which is often unavailable on remote machines. During training or serving, the context can be saved using context.snapshot(). It is possible to provide snapshots with a name otherwise the name will be a timestamp. Snapshots can be loaded later on any machine with an instance of Zetane Engine.

Google Colaboratory

This example is about Google Colaboratory but the principle could be applied to any remote training platform.

Download this example

  • Check that the OS (windows, macos, unix) and python version is compatible with Zetane (python >= 3.6)

_images/remote_check.jpg
  • Install Zetane using pip.

pip install zetane --upgrade -f https://download.zetane.com/zetane/index.html
  • Once it completes, click the RESTART RUNTIME button.

_images/remote_restart.jpg
  • Run a python script in Zetane using the remote Context and make a snapshot at the end.

import requests
import zetane.context as ztn

url = "https://github.com/onnx/models/raw/master/vision/classification/mnist/model/mnist-8.onnx"
file = requests.get(url)
open('mnist-8.onnx', 'wb').write(file.content)

zcontext = ztn.Context(remote=True).launch()
zmodel = zcontext.model().onnx('mnist-8.onnx').update()
zcontext.snapshot('mnist')
_images/remote_run.jpg
  • Go on the left menu in files and download the .``.ztnx`` (or .snap) file.

_images/remote_download.jpg
  • Load this file on a local Zetane instance using the Load Form button.

_images/remote_upload.jpg

This loads a snapshot of what the remote training looked like at a specific time:

_images/remote_result.jpg