Model training

Based on TensorBay Action, this example integrates four steps: data crawling, conversion, parsing, and analytics into a complete workflow, giving you a quick overview of the Graviti Data platform.

1. Prepare data

a. Enter the Open Datasets page. Search and fork MNIST to your own workspace.

2. Configurate the AccessKey

a. Enter the Developer Tools page,create and copy an AccessKey.

b. Enter theMNISTdataset you have forked.

c. Click Action Configuration and create Secret on the Settings page.

d. Name the secret you have created as accesskey, and paste the secret value that was copied in step a.

3. Create a training evaluation workflow

a. Click Create Workflow on the Action page.

b. Use the yaml file to create a workflow.

Create a dataset to save the training Model.

createModelDataset: script: # The docker image on which this task depends is as below (Images from public and private repositories are both available) image: hub.graviti.cn/algorithm/mnist:1.0

Train a mnist Model, and use the output model file for prediction

training: dependencies: - createModelDataset script: image: hub.graviti.cn/algorithm/mnist:1.0 command: [python3] source: | import logging import os

evaluate: dependencies: - training script: image: hub.graviti.cn/algorithm/mnist:1.0 command: [python3] source: | import logging import os from concurrent.futures import ThreadPoolExecutor

4. Start Training

a. Choose the target workflow and click Run on the Action page.

5. View the result

a. View the details of the running on the Workflow Detail page.

b. View the Model Prediction result, diff visualizations and distribution changes in the training Branch.

c. Check the training Model that has been saved

Last updated

Was this helpful?