In our example below, the train-model
step is responsible for training a model file and saving it to /valohai/outputs/model.pkl
. This file is preserved, uploaded to your storage, and versioned.
In the edge definition, we specify that we intend to pass this generated file to the test-model
node and position it as the model
input.
- step:
name: train-model
image: tensorflow/tensorflow:2.4.1
command: python train.py
- step:
name: test-model
image: tensorflow/tensorflow:2.4.1
command: python test.py
inputs:
- name: model
- pipeline:
name: Data example
nodes:
- name: train-model
step: train-model
type: execution
- name: test-model
step: test-model
type: execution
edges:
- [train-model.output.model.pkl, test-model.input.model]