-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.py
43 lines (37 loc) · 1.1 KB
/
pipeline.py
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
from argoflow.tasks import *
from argoflow.workflow import *
tasks = taskFlow()
tasks.addJob(
name="generateSyntheticData",
template="synthea",
parameters=[{"name": "population", "value": "1000000"}],
)
tasks.addJob(
name="transformData",
template="pyspark",
parameters=[
{"name": "observations", "value": "mounted/data/observations.csv"},
{"name": "patients", "value": "mounted/data/patients.csv"},
{"name": "conditions", "value": "mounted/data/conditions.csv"},
{"name": "target", "value": "mounted/data/processed.parquet"},
],
dependencies=["generateSyntheticData"],
)
tasks.addJob(
name="model",
template="scikit",
parameters=[
{"name": "source", "value": "data/processed.parquet"},
{"name": "target", "value": "data/model.pkl"},
],
dependencies=["transformData"],
)
tasks.addJob(
name="Deploy",
template="streamit",
parameters=[{"name": "model", "value": "data/model.pkl"}],
dependencies=["model"],
)
data = tasks.compile()
dag = workflow("DiabetesModel", data,authpath='./config.yaml')
dag.submit()