-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalohai.yaml
204 lines (187 loc) Β· 5.12 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
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# MECH - Metadata
- step:
name: create-noise
image: ghcr.io/astral-sh/uv:python3.11-bookworm-slim
command: uv run mech {parameters}
parameters:
- name: beep-count
type: integer
default: 25
- name: boop-count
type: integer
default: 25
- step:
name: announce-noise
image: ghcr.io/astral-sh/uv:python3.11-bookworm-slim
command:
- echo {parameters}
parameters:
- name: message
type: string
- pipeline:
name: beep-boop-pipeline
nodes:
- name: create-noise-node
step: create-noise
type: execution
- name: announce-beeps-node
step: announce-noise
type: task
- name: announce-boops-node
step: announce-noise
type: task
edges:
- source: create-noise-node.metadata.beeps
target: announce-beeps-node.parameter.message
- source: create-noise-node.metadata.boops
target: announce-boops-node.parameter.message
# PROPHET - Models and Model Versions
- step:
name: create-model-version
description: Create a new model version, remember to create the model before creating any versions!
image: ghcr.io/astral-sh/uv:python3.11-bookworm-slim
command: uv run prophet {parameters}
parameters:
- name: model-uri
type: string
default: "model://unicorns/"
# SPAWNING POOL - Data and Data Versions
- step:
name: trawl-shrimp
image: python:3.11-slim-bookworm
command:
- echo inputs...
- ls -halt /valohai/inputs
- echo and then the school...
- ls -halt /valohai/inputs/school
inputs:
- name: school
- step:
name: environmental-impact
image: python:3.11-slim-bookworm
command:
- printenv
environment-variables:
- name: STEP_FURNITURE
default: chair
- name: STEP_FOOD
default: lasagna
optional: false
# General - Parameter Debugging
- step:
name: splash-it
image: python:3.11-slim-bookworm
command:
- echo {parameters}
parameters:
- name: identifier
type: string
- name: message
type: string
- name: age
type: integer
- name: constant
type: string
default: "THIS IS CONSTANT"
- pipeline:
name: splash-them-all
nodes:
- name: splash-1
step: splash-it
type: execution
- name: splash-2
step: splash-it
type: execution
- name: splash-task
step: splash-it
type: task
edges: []
parameters:
- name: shared-identifier
targets:
- splash-1.parameters.identifier
- splash-2.parameters.identifier
- splash-task.parameters.identifier
- name: greeting-message
targets: splash-1.parameters.message
- name: welcome-message
targets: splash-2.parameters.message
- name: goodbye-message
target: splash-task.parameters.message
- name: shared-age
targets:
- splash-1.parameters.age
- splash-2.parameters.age
- splash-task.parameters.age
- pipeline:
name: splash-execution-numbers
nodes:
- name: splash-that-number
step: splash-it
type: execution
edges: []
parameters:
- name: shared-identifier
targets: splash-that-number.parameters.identifier
- name: shared-message
targets: splash-that-number.parameters.message
- name: shared-age
targets: splash-that-number.parameters.age
- pipeline:
name: splash-task-numbers
nodes:
- name: splash-that-number
step: splash-it
type: task
edges: []
parameters:
- name: shared-identifier
targets: splash-that-number.parameters.identifier
- name: shared-message
targets: splash-that-number.parameters.message
- name: shared-age
targets: splash-that-number.parameters.age
# General - Text Processing
- step:
name: novelist
image: python:3.11-slim-bookworm
command:
- ls -la /valohai/inputs/medium
- cp /valohai/inputs/medium/*.txt /valohai/outputs/`echo $RANDOM | md5sum | head -c 20`.txt
- echo {parameter-value:content} >> /valohai/outputs/*.txt
- ls -la /valohai/outputs
parameters:
- name: content
type: string
default: "This is novel content."
inputs:
- name: medium
default: https://valohai-public-files.s3.eu-west-1.amazonaws.com/examples/book.txt
- pipeline:
name: chain-novelist
nodes:
- name: writer-1
step: novelist
type: execution
- name: writer-2
step: novelist
type: execution
override:
inputs:
- name: medium
default: ""
- name: writer-3
step: novelist
type: execution
override:
inputs:
- name: medium
default: ""
edges:
- [writer-1.output.*, writer-2.input.medium]
- [writer-2.output.*, writer-3.input.medium]
parameters:
- name: two-and-three-content
targets:
- writer-2.parameters.content
- writer-3.parameters.content