-
Notifications
You must be signed in to change notification settings - Fork 2
/
activity_cognition_10.plantuml
74 lines (67 loc) · 1.29 KB
/
activity_cognition_10.plantuml
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
@startuml
|Pandora Contract|
|Workers|
|Pandora Contract|
start
partition checkInputs {
if (kernel.input_dim = dataset.dim) then (yes)
if (client.deposit = kernel.job_complexity etc) then (yes)
else (no)
:error#2>
end
endif
else (no)
:error#1>
end
endif
}
partition startCognition {
repeat
:lottery|
:cognitiveJobCreated/
fork
:waitingForResponses;
detach
fork again
|Workers|
start
if (busy) then (yes)
:busy>
else (no)
:downloadData]
:checkData|
:launchModel]
:checkModel|
if (everything is ok) then (no)
:invalidData>
else (yes)
:ready>
endif
endif
end fork
|Pandora Contract|
fork
:workerResponse<
fork again
:workerResponse<
fork again
:...<
end fork
if (∃ response = invalidData) then (yes)
:Invalid data arbitrage|
end
elseif (∃ response = busy) then (yes)
:penaltyToWorker#1]
elseif (noTries > N) then (yes)
:paybackClient(noValidationDeposit)]
:cognitiveJobCancelled(reason#1)/
end
else (timeout)
:penaltyToWorker#2]
endif
repeat while (∀ responses = accept) is (no)
}
partition cognitiveMining {
stop
}
@enduml