-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
add.yaml
44 lines (39 loc) · 1019 Bytes
/
add.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
author: "c@openmined.org"
project: "add"
language: "python"
description: "Add two numbers"
code:
- functions.py
# Define shared resources using anchors
shared_inputs:
data: &data FilePipe("{datasite}/data/data.txt")
output: &output FilePipe("{datasite}/fedreduce/{project}/data/{step}/result.txt")
shared_outputs:
result: &result FilePipe("{author}/fedreduce/{project}/data/result/result.txt")
# Define the main workflow parameters
workflow:
datasites: &datasites []
# Define what each step does
steps:
- first:
inputs:
- a: StaticPipe(0) # Override input for the first step
- last:
output:
path: *result
permissions:
read:
- *datasites
- foreach: *datasites
run: "{datasite}"
function: "add"
inputs:
- a: FilePipe("{prev_datasite}/fedreduce/{project}/data/{prev_step}/result.txt")
- b: *data
output:
path: *output
permissions:
read:
- "{next_datasite}"
complete:
exists: *result