Overview

Dong platform consists of

  1. Dong Framework – a MLOps project framework.
  2. Dong Cloud – a MLOps cloud service for managing cloud training/deployment of a Dong Framework project.
  3. Dong Cli – a client side command line tool to quickly build or execute a Dong Framework project on local test or on Dong Cloud.

In this quickstart step-by-step guide we’ll use Dong to train and deploy a model using mnist dataset.

Installation

Install client side Dong Cli.

$ pip install dong

Signup

Please apply via the form to get a trial account.

Login

$ dong login

The example mnist dong project

Get the example mnist dong project.

$ git clone https://github.com/libgirlenterprise/my_dong_mnist.git
$ cd my_dong_mnist

Train/Deploy example

Local test

Not yet released.

Train on dong’s cloud

$ ls # make sure we're under the right directory
setup.py    my_dong_mnist   scripts
$ dong train exec -m "my first dong train exec"

Use dong ML project: my_dong_mnist
Project path: /private/tmp/my_dong_mnist
Building package...
Uploading package...
Job name: [JOB_NAME]

It will take about 3 mins. You can do status check by

$ dong train status -j JOB_NAME
name: JOB_NAME
message: my first dong train exec
status: Running

Deploy the model to an API endpoint

Check if the train succeeds or not.

$ dong train status -j JOB_NAME
name: JOB_NAME
message: my first dong train exec
status: Succeeded

Deploy

$ dong endpoint up JOB_NAME
Bring up...
New endpoint name: ENDPOINT_NAME

Endpoint status check

$ dong endpoint status -e ENDPOINT_NAME
Endpoint name: ENDPOINT_NAME
External ip: ENDPOINT_IP
Status: Preparing

Test the endpoint

Check if the endpoint is ready running or not.

$ dong endpoint status -e ENDPOINT_NAME
Endpoint name: ENDPOINT_NAME
External ip: ENDPOINT_IP
Status: Running

Then we can test the endpoint APIs.

http://ENDPOINT_IP/api/v1/hello

$ bash scripts/hello.sh ENDPOINT_IP

"hello"

http://ENDPOINT_IP/api/v1/inference

$ bash scripts/inference.sh ENDPOINT_IP

The reply should look something like this,

 [[2.879309568548649e-10, 2.6625946239478004e-11, 2.580107016925126e-09, 5.453760706930488e-12, 0.9999690055847168, 3.3259575649147166e-10, 3.2778924019538636e-10, 4.35676184906697e-07, 2.190379821964683e-10, 3.0488341508316807e-05], [1.3478038130010361e-10, 0.9997259974479675, 6.728584622806011e-08, 5.9139901864568856e-09, 9.023875122693426e-07, 5.708465922182882e-10, 1.2523435088951373e-07, 0.0002721738419495523, 6.667413003924594e-07, 9.076808638042166e-09]]