-
Notifications
You must be signed in to change notification settings - Fork 0
/
valohai.yaml
82 lines (74 loc) · 2.17 KB
/
valohai.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
- step:
name: preprocess
image: python:3.9
environment: azure-westeurope-f2sv2
command:
- pip install evidently==0.4.16 pandas==2.2.1 scikit-learn==1.4.1.post1 valohai
- python preprocess.py
inputs:
- name: dataset
optional: true
- step:
name: train_model
image: python:3.9
environment: azure-westeurope-f2sv2
command:
- pip install evidently==0.4.16 pandas==2.2.1 scikit-learn==1.4.1.post1
- python train_model.py
inputs:
- name: dataset
default: datum://california_housing_dataset
- pipeline:
name: train-pipeline
nodes:
- name: preprocess-node
type: execution
step: preprocess
- name: train-model-node
type: execution
step: train_model
edges:
- [preprocess-node.output.*.csv, train-model-node.input.dataset]
- step:
name: inference_and_report
image: python:3.9
environment: azure-westeurope-f2sv2
command:
- pip install evidently==0.4.16 pandas==2.2.1 scikit-learn==1.4.1.post1
- pip install valohai-utils
- python report.py
inputs:
- name: ref_dataset
default: datum://california_housing_dataset
- name: cur_dataset
default: https://valohai-demo-library-data.s3.eu-west-1.amazonaws.com/drift-detection/evidently_data_with_drift.csv
- name: model
default: datum://california_housing_model
- step:
name: call-retrain
image: python:3.9
environment: azure-westeurope-f2sv2
command:
- pip install valohai-utils
- python call-retrain.py
parameters:
- name: dataset_path
optional: true
- pipeline:
name: inference-drift-detection-pipeline
nodes:
- name: inference_and_drift-detect
type: execution
step: inference_and_report
actions:
- when: node-complete
if: metadata.drift != 1
then: stop-pipeline
- name: call-retrain
type: execution
step: call-retrain
actions:
- when: node-starting
then: require-approval
edges:
- [inference_and_drift-detect.metadata.dataset_path,call-retrain.parameter.dataset_path]