-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvalohai.yaml
444 lines (444 loc) · 16.5 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
- step:
name: redshift-query
image: python:3.11-slim
command:
- pip install -r connectors/steps/redshift/requirements.txt -q
- python -m connectors.steps.redshift.query
icon: redshift
category: connectors
parameters:
- name: sql_query
type: string
default: SELECT GETDATE() as current_datetime, 1 as one, 2 as two;
description: SQL query to be executed
widget: SQL
- name: datum_alias
type: string
description: Valohai datum alias given for the output
optional: true
widget: datumalias
- name: output_path
type: string
description: The name and path for the output file
default: results.csv
environment-variables:
- name: RSHOST
description: Redshift cluster endpoint url, e.g. "<cluster-identifier>.xxxxxxxxx.xx-xxxx-x.redshift.amazonaws.com"
- name: RSDATABASE
description: Database name to query from
- name: RSUSER
description: Database user name
- name: RSREGION
description: AWS region of the Redshift cluster e.g. "eu-west-1"
default: "eu-west-1"
- name: RSPORT
description: The network port of the Redshift cluster endpoint
default: "5439"
- name: RSPASSWORD
description: Database user password. Only used if RSUSEIAM is false.
optional: true
- name: RSIAM
description: Use Valohai worker IAM role or raw credentials. 0 = Pass the raw password with RSPASSWORD, 1 = Use the IAM to fetch temporary credentials
optional: true
default: "1"
- name: RSCLUSTERIDENTIFIER
description: The name of the cluster. Usually used by AWS as the first segment of Redshift cluster endpoint url.
optional: true
- step:
name: snowflake-query
image: python:3.11-slim
command:
- pip install -q -r connectors/steps/snowflake/requirements.txt
- python -m connectors.steps.snowflake.query
icon: snowflake
category: connectors
parameters:
- name: sql_query
type: string
default: SELECT GETDATE() as current_datetime, 1 as one, 2 as two;
description: SQL query to be executed
widget: SQL
- name: datum_alias
type: string
description: Valohai datum alias given for the output
optional: true
widget: datumalias
- name: output_path
type: string
description: The name and path for the output file
default: results.csv
environment-variables:
- name: SNOWSQL_ACCOUNT
description: Snowflake account indentifier (usually xxxxxxx-yynnnnn)
- name: SNOWSQL_USER
description: Snowflake user name
- name: SNOWSQL_ROLE
description: Snowflake role
- name: SNOWSQL_PWD
description: Snowflake password
- name: SNOWSQL_PRIVATEKEY
description: Snowflake keyfile. Provide the contents of the file without line breaks and without -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY-----
- name: SNOWSQL_PASSPHRASE
description: Snowflake passphrase for private key
- name: SNOWSQL_WAREHOUSE
description: Snowflake warehouse name
- name: SNOWSQL_SCHEMA
description: Schema in the database to use.
default: PUBLIC
- name: SNOWSQL_DATABASE
description: Snowflake database name
- step:
name: bigquery-query
image: python:3.11-slim
command:
- pip install -q -r connectors/steps/bigquery/requirements.txt
- python -m connectors.steps.bigquery.query
icon: bigquery
category: connectors
parameters:
- name: sql_query
type: string
default: SELECT CURRENT_DATETIME() AS current_datetime, 1 as one, 2 as two;
description: SQL query to be executed
widget: SQL
- name: datum_alias
type: string
description: Valohai datum alias given for the output
optional: true
widget: datumalias
- name: output_path
type: string
description: The name and path for the output file
default: results.csv
environment-variables:
- name: GCP_PROJECT
description: GCP project id
- name: GCP_IAM
description: 1 = Use Valohai worker IAM service role to connect, 0 = Use GCP_KEYFILE_CONTENTS_JSON
default: "1"
- name: GCP_KEYFILE_CONTENTS_JSON
description: The full contents of the GCP service account key file in JSON
optional: true
- step:
name: huggingface-classification-train
image: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
environment: aws-eu-west-1-p2-xlarge
command:
- pip install -r models/nlp/classification/huggingface/requirements.txt
- python -m models.nlp.classification.huggingface.train
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
category: Huggingface / Classification
parameters:
- name: huggingface_repository
type: string
default: distilbert-base-uncased
- name: num_labels
type: integer
default: 0
description: Number of different labels (classes) in the dataset. 0 = Infer from the dataset
- name: learning_rate
type: float
default: 0.00002
description: Learning rate for the optimizer.
- name: adam_beta1
type: float
default: 0.9
description: Exponential decay rate for the first moment estimates in Adam optimizer.
- name: adam_beta2
type: float
default: 0.999
description: Exponential decay rate for the second moment estimates in Adam optimizer.
- name: adam_epsilon
type: float
default: 1e-08
description: Epsilon parameter for numerical stability in Adam optimizer.
- name: max_grad_norm
type: float
default: 1.0
description: Maximum gradient norm for gradient clipping.
- name: seed
type: integer
default: 42
description: Random seed for reproducibility.
- name: weight_decay
type: float
default: 0.01
description: Weight decay (L2 penalty) for regularization.
- name: warmup_steps
type: integer
default: 0
description: The number of steps for linearly increasing the learning rate from 0 to the set value.
- name: batch_size
type: integer
default: 8
description: Batch size for training and evaluation.
- name: eval_steps
type: integer
default: 50
description: Number of batches between evaluation on the validation set.
- name: max_steps
type: integer
default: -1
description: Maximum number of training steps (-1 means no limit).
- name: num_train_epochs
type: integer
default: 3
description: Number of epochs to train the model for.
- name: test_split_size
type: float
default: 0.05
description: Fraction of the training set to use as a holdout for testing.
- name: disable_tqdm
type: flag
default: false
description: Whether to disable the progress bar during training and evaluation.
inputs:
- name: dataset
default: https://valohai-ecosystem-datasets.s3.eu-west-1.amazonaws.com/yelp_reviews_medium.csv
- step:
name: huggingface-classification-inference
image: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
environment: aws-eu-west-1-p2-xlarge
command:
- pip install -r models/nlp/classification/huggingface/requirements.txt
- python -m models.nlp.classification.huggingface.inference
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
category: Huggingface / Classification
parameters:
- name: output_path
type: string
description: The name and path for the output file
default: results.csv
- name: log_frequency
type: integer
description: Log the progress every n items
default: 100
- name: huggingface_repository
type: string
optional: true
description: (Optional) The name of a Hugging Face repository to use a pre-trained model.
inputs:
- name: model
- name: data
default: https://valohai-ecosystem-datasets.s3.eu-west-1.amazonaws.com/yelp_reviews_batch_inference.txt
- step:
name: huggingface-qa-train
image: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
environment: aws-eu-west-1-p2-xlarge
command:
- pip install -r models/nlp/qa/huggingface/requirements.txt
- python -m models.nlp.qa.huggingface.train
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
category: Huggingface / Question Answering
parameters:
- name: huggingface_repository
type: string
default: distilbert-base-uncased
description: The name of the Hugging Face repository for the pre-trained model to be used.
- name: max_length
type: integer
default: 384
description: The maximum length of a feature (question and context) to be considered during training.
- name: doc_stride
type: integer
default: 128
description: The authorized overlap between two part of the context when splitting it is needed.
- name: learning_rate
type: float
default: 0.00002
description: The learning rate to be used during training.
- name: adam_beta1
type: float
default: 0.9
description: Exponential decay rate for the first moment estimates in Adam optimizer.
- name: adam_beta2
type: float
default: 0.999
description: Exponential decay rate for the second moment estimates in Adam optimizer.
- name: adam_epsilon
type: float
default: 1e-08
description: A small value to add to the denominator in Adam optimizer for numerical stability.
- name: max_grad_norm
type: float
default: 1.0
description: The maximum norm of the gradient.
- name: seed
type: integer
default: 42
description: The random seed to be used during training for reproducibility.
- name: weight_decay
type: float
default: 0.01
description: The L2 regularization coefficient.
- name: warmup_steps
type: integer
default: 0
description: The number of steps for linearly increasing the learning rate from 0 to the set value.
- name: batch_size
type: integer
default: 8
description: The batch size.
- name: eval_steps
type: integer
default: 500
description: Number of batches between evaluation on the validation set.
- name: max_steps
type: integer
default: -1
description: The maximum number of steps for training. -1 = No limit
- name: num_train_epochs
type: integer
default: 3
description: The maximum number of epochs for training.
- name: test_split_size
type: float
default: 0.01
description: The percentage of the training data to use for testing.
- name: disable_tqdm
type: flag
default: true
description: Whether or not to disable the progress bar during training.
inputs:
- name: dataset
default: https://valohai-ecosystem-datasets.s3.eu-west-1.amazonaws.com/squadv1.csv
- step:
name: huggingface-qa-inference
image: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
environment: aws-eu-west-1-p2-xlarge
command:
- pip install -r models/nlp/qa/huggingface/requirements.txt
- python -m models.nlp.qa.huggingface.inference
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
category: Huggingface / Question Answering
parameters:
- name: output_path
type: string
description: The name and path for the output file
default: results.csv
- name: log_frequency
type: integer
description: Log the progress every n items
default: 100
- name: huggingface_repository
type: string
optional: true
description: (Optional) The name of a Hugging Face repository to use a pre-trained model.
inputs:
- name: model
- name: data
default: https://valohai-ecosystem-datasets.s3.eu-west-1.amazonaws.com/squadv1_batch_inference.csv
- step:
name: huggingface-summarization-train
image: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
environment: aws-eu-west-1-p2-xlarge
command:
- pip install -r models/nlp/summarization/huggingface/requirements.txt
- python -m models.nlp.summarization.huggingface.train
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
category: Huggingface / Summarization
parameters:
- name: huggingface_repository
type: string
default: sshleifer/distilbart-xsum-12-1
- name: max_text_length
type: integer
default: 128
description: The maximum length of the text (in tokens)
- name: max_summary_length
type: integer
default: 128
description: The maximum length of the text (in tokens)
- name: learning_rate
type: float
default: 0.0001
description: The learning rate used for the optimizer.
- name: adam_beta1
type: float
default: 0.9
description: Exponential decay rate for the first moment estimates in Adam optimizer.
- name: adam_beta2
type: float
default: 0.999
description: Exponential decay rate for the second moment estimates in Adam optimizer.
- name: adam_epsilon
type: float
default: 1e-08
description: A small value to add to the denominator in Adam optimizer for numerical stability.
- name: max_grad_norm
type: float
default: 1.0
description: The maximum norm of the gradient for gradient clipping.
- name: seed
type: integer
default: 42
description: The random seed used for reproducibility.
- name: weight_decay
type: float
default: 0.0
description: The L2 regularization coefficient.
- name: warmup_steps
type: integer
default: 0
description: The number of steps for linearly increasing the learning rate from 0 to the set value.
- name: batch_size
type: integer
default: 4
description: The number of samples per batch during training.
- name: eval_steps
type: integer
default: 500
description: Number of batches between evaluation on the validation set.
- name: max_steps
type: integer
default: -1
description: The maximum number of training steps. -1 = No limit
- name: num_train_epochs
type: integer
default: 3
description: The number of training epochs.
- name: test_split_size
type: float
default: 0.001
description: The proportion of samples used for testing.
- name: disable_tqdm
type: flag
default: false
description: Whether to disable tqdm progress bar during training.
inputs:
- name: dataset
default: https://valohai-ecosystem-datasets.s3.eu-west-1.amazonaws.com/aeslc.csv
- step:
name: huggingface-summarization-inference
image: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
environment: aws-eu-west-1-p2-xlarge
command:
- pip install -r models/nlp/summarization/huggingface/requirements.txt
- python -m models.nlp.summarization.huggingface.inference
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
category: Huggingface / Summarization
inputs:
- name: model
- name: data
default: https://valohai-ecosystem-datasets.s3.eu-west-1.amazonaws.com/aeslc_batch_inference.txt
parameters:
- name: max_text_length
type: integer
default: 128
description: The maximum length of the text (in tokens)
- name: max_summary_length
type: integer
default: 128
description: The maximum length of the text (in tokens)
- name: log_frequency
type: integer
description: Log the progress every n items
default: 100
- name: output_path
type: string
description: The name and path for the output file
default: results.csv
- name: huggingface_repository
type: string
optional: true
description: (Optional) The name of a Hugging Face repository to use a pre-trained model.