-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
161 lines (159 loc) · 4.37 KB
/
config.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Job specs define the configuration for Bacalhau jobs
jobs:
- id: root-job # A job that accepts a root input and passes it to the output -- the root of all jobs
type: internal # This job will run on an internal executor. Internal job, doesn't leave Amplify.
internal_job_id: root-job # Link to internal job ID, must exist in the codebase
- id: metadata-job # This is the key used when looking for a job
type: bacalhau # This job will run on the Bacalhau executor
image: ghcr.io/bacalhau-project/amplify/tika:0.0.5
entrypoint:
- /usr/local/bin/run
- id: merge-job
image: ghcr.io/bacalhau-project/amplify/merge:0.0.1
entrypoint:
- /usr/local/bin/run
- id: image-resize-job # This job resizes images recursively
type: bacalhau
image: ghcr.io/bacalhau-project/amplify/magick:0.0.1
entrypoint:
- /usr/local/bin/run
- id: video-resize-job
type: bacalhau
image: ghcr.io/bacalhau-project/amplify/ffmpeg:0.0.3
entrypoint:
- /usr/local/bin/run
- id: csv-profiling-job
type: bacalhau
image: ghcr.io/bacalhau-project/amplify/ydata-profiling:0.0.5
entrypoint:
- /usr/local/bin/run
- id: csv-frictionless-job
type: bacalhau
image: ghcr.io/bacalhau-project/amplify/frictionless:0.0.2
entrypoint:
- /usr/local/bin/run
- id: convert-table-to-csv-job
type: bacalhau
image: ghcr.io/bacalhau-project/amplify/frictionless-extract:0.0.6
entrypoint:
- /usr/local/bin/run
- id: detection-job
type: bacalhau
image: ghcr.io/bacalhau-project/amplify/detection:0.0.4
entrypoint:
- /usr/local/bin/run
timeout: 10m
cpu: 2
memory: 8Gi
- id: summarization-job
type: bacalhau
image: ghcr.io/bacalhau-project/amplify/summarization:0.0.3
entrypoint:
- /usr/local/bin/run
timeout: 10m
cpu: 4
memory: 8Gi
# Amplify Work Graph specification
# Each item in the list is a node in the execution graph. A single request
# (typically a single CID) runs this whole graph.
graph:
- id: root-node # This is the root of the dag, where the request CID is placed
job_id: root-job
inputs:
- root: true # Identifies that this is a root node
path: /inputs # Path where inputs will be placed
outputs:
- # id: default # Specify custom output id (default: "default")
path: /outputs # Path where job places outputs
- id: metadata-node
job_id: metadata-job
inputs:
- node_id: root-node
# output_id: custom_id # Connect to custom output id (default: "default")
path: /inputs
outputs:
- path: /outputs
- id: image-resize-node
job_id: image-resize-job
inputs:
- node_id: metadata-node
predicate: '.*image\/.*'
- node_id: root-node
path: /inputs/image/
outputs:
- path: /outputs
- id: video-resize-node
job_id: video-resize-job
inputs:
- node_id: metadata-node
predicate: '.*video\/.*'
- node_id: root-node
path: /inputs
outputs:
- path: /outputs
- id: convert-table-to-csv-node
job_id: convert-table-to-csv-job
inputs:
- node_id: root-node
path: /inputs/
outputs:
- path: /outputs
- id: csv-validation-node
job_id: csv-frictionless-job
inputs:
- node_id: metadata-node
predicate: '.*text\/csv.*'
- node_id: root-node
path: /inputs/
outputs:
- path: /outputs
- id: csv-profiling-node
job_id: csv-profiling-job
inputs:
- node_id: csv-validation-node
predicate: '.*"valid":true.*'
- node_id: root-node
path: /inputs/
outputs:
- path: /outputs
- id: detection-node
job_id: detection-job
inputs:
- node_id: metadata-node
predicate: '.*(video\/|image\/).*'
- node_id: root-node
path: /inputs
outputs:
- path: /outputs
- id: text-summarization-node
job_id: summarization-job
inputs:
- node_id: metadata-node
predicate: '.*text\/plain.*'
- node_id: root-node
path: /inputs/
outputs:
- path: /outputs
- id: merge-node
job_id: merge-job
inputs:
- node_id: root-node
path: /inputs/src
- node_id: metadata-node
path: /inputs/metadata-node
- node_id: video-resize-node
path: /inputs/video-resize-node
- node_id: detection-node
path: /inputs/detection-node
- node_id: image-resize-node
path: /inputs/image-resize-node
- node_id: csv-validation-node
path: /inputs/csv-validation-node
- node_id: csv-profiling-node
path: /inputs/csv-profiling-node
- node_id: convert-table-to-csv-node
path: /inputs/convert-table-to-csv-node
- node_id: text-summarization-node
path: /inputs/text-summarization-node
outputs:
- path: /outputs