forked from Azure/azureml-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.yml
89 lines (82 loc) · 2.59 KB
/
pipeline.yml
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
83
84
85
86
87
88
89
$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
type: pipeline
description: Train model with nyc taxi data
display_name: nyc-taxi-pipeline-example
experiment_name: nyc-taxi-pipeline-example
jobs:
prep_job:
type: command
inputs:
raw_data:
type: uri_folder
path: ./data
outputs:
prep_data:
mode: upload
code: src/prep
environment: azureml://registries/azureml/environments/sklearn-1.5/labels/latest
compute: azureml:cpu-cluster
command: >-
python prep.py
--raw_data ${{inputs.raw_data}}
--prep_data ${{outputs.prep_data}}
transform_job:
type: command
inputs:
clean_data: ${{parent.jobs.prep_job.outputs.prep_data}}
outputs:
transformed_data:
mode: upload
code: src/transform
environment: azureml://registries/azureml/environments/sklearn-1.5/labels/latest
compute: azureml:cpu-cluster
command: >-
python transform.py
--clean_data ${{inputs.clean_data}}
--transformed_data ${{outputs.transformed_data}}
train_job:
type: command
inputs:
training_data: ${{parent.jobs.transform_job.outputs.transformed_data}}
outputs:
model_output:
test_data:
mode: upload
code: src/train
environment: azureml://registries/azureml/environments/sklearn-1.5/labels/latest
compute: azureml:cpu-cluster
command: >-
python train.py
--training_data ${{inputs.training_data}}
--test_data ${{outputs.test_data}}
--model_output ${{outputs.model_output}}
predict_job:
type: command
inputs:
model_input: ${{parent.jobs.train_job.outputs.model_output}}
test_data: ${{parent.jobs.train_job.outputs.test_data}}
outputs:
predictions:
code: src/predict
environment: azureml://registries/azureml/environments/sklearn-1.5/labels/latest
compute: azureml:cpu-cluster
command: >-
python predict.py
--model_input ${{inputs.model_input}}
--test_data ${{inputs.test_data}}
--predictions ${{outputs.predictions}}
score_job:
type: command
inputs:
predictions: ${{parent.jobs.predict_job.outputs.predictions}}
model: ${{parent.jobs.train_job.outputs.model_output}}
outputs:
score_report:
code: src/score
environment: azureml://registries/azureml/environments/sklearn-1.5/labels/latest
compute: azureml:cpu-cluster
command: >-
python score.py
--predictions ${{inputs.predictions}}
--model ${{inputs.model}}
--score_report ${{outputs.score_report}}