Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
4 contributors

Users who have contributed to this file

@ruksi @orasimus @akx @Tailgunnerii
94 lines (87 sloc) 3.25 KB
---
- step:
name: Preprocess dataset (MNIST)
image: tensorflow/tensorflow:1.13.1-gpu-py3
command: python preprocess.py
inputs:
- name: training-set-images
default: https://valohaidemo.blob.core.windows.net/mnist/train-images-idx3-ubyte.gz
- name: training-set-labels
default: https://valohaidemo.blob.core.windows.net/mnist/train-labels-idx1-ubyte.gz
- name: test-set-images
default: https://valohaidemo.blob.core.windows.net/mnist/t10k-images-idx3-ubyte.gz
- name: test-set-labels
default: https://valohaidemo.blob.core.windows.net/mnist/t10k-labels-idx1-ubyte.gz
- step:
name: Train model (MNIST)
image: tensorflow/tensorflow:1.13.1-gpu-py3
command: python train.py {parameters}
parameters:
- name: max_steps
pass-as: --max_steps={v}
description: Number of steps to run the trainer
type: integer
default: 300
- name: learning_rate
pass-as: --learning_rate={v}
description: Initial learning rate
type: float
default: 0.001
- name: dropout
pass-as: --dropout={v}
description: Keep probability for training dropout
type: float
default: 0.9
- name: batch_size
pass-as: --batch_size={v}
description: Training batch size (larger batches are usually more efficient on GPUs)
type: integer
default: 200
inputs:
- name: training-set-images
default: https://valohaidemo.blob.core.windows.net/mnist/train-images-idx3-ubyte.gz
- name: training-set-labels
default: https://valohaidemo.blob.core.windows.net/mnist/train-labels-idx1-ubyte.gz
- name: test-set-images
default: https://valohaidemo.blob.core.windows.net/mnist/t10k-images-idx3-ubyte.gz
- name: test-set-labels
default: https://valohaidemo.blob.core.windows.net/mnist/t10k-labels-idx1-ubyte.gz
- step:
name: Batch inference (MNIST)
environment: azure-westeurope-f2sv2
image: tensorflow/tensorflow:1.13.1-py3
command:
- pip install --disable-pip-version-check --quiet -r requirements.txt
- python batch_inference.py --model-pb=/valohai/inputs/model/model.pb --input-root=/valohai/inputs/images
inputs:
- name: model
- name: images
default:
- https://valohaidemo.blob.core.windows.net/mnist/four-inverted.png
- https://valohaidemo.blob.core.windows.net/mnist/five-inverted.png
- https://valohaidemo.blob.core.windows.net/mnist/five-normal.jpg
- step:
name: Worker environment check
image: tensorflow/tensorflow:1.13.1-gpu-py3
command:
- pwd
- ls -la
- nvidia-smi
- python --version
- nvcc --version | grep release
- cat /usr/include/x86_64-linux-gnu/cudnn_v*.h | grep CUDNN_MAJOR -A 2
- endpoint:
name: greet
image: python:3.6
port: 8000
server-command: python -m wsgiref.simple_server
description: test the serving environment
- endpoint:
name: predict-digit
description: predict digits from image inputs ("file" parameter)
image: tensorflow/tensorflow:1.13.1-py3
wsgi: predict_wsgi:predict_wsgi
files:
- name: model
description: Model output file from TensorFlow
path: model.pb
You can’t perform that action at this time.