forked from HewlettPackard/swarm-learning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swci-init
63 lines (53 loc) · 1.79 KB
/
swci-init
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
######################################################################
# (C)Copyright 2021-2023 Hewlett Packard Enterprise Development LP
######################################################################
# Assumption : SWOP is already running
# SWCI context setup
EXIT ON FAILURE
wait for ip sn1
create context test-mnist with ip sn1
switch context test-mnist
EXIT ON FAILURE OFF
#Change to the directory where we are mounting the host
cd /platform/swarm/usr
# Create and finalize build task
EXIT ON FAILURE
create task from taskdefs/user_env_tf_build_task.yaml
finalize task user_env_tf_build_task
get task info user_env_tf_build_task
get task body user_env_tf_build_task
list tasks
EXIT ON FAILURE OFF
# Assign build task to taskrunner
EXIT ON FAILURE
RESET TASKRUNNER defaulttaskbb.taskdb.sml.hpe
ASSIGN TASK user_env_tf_build_task TO defaulttaskbb.taskdb.sml.hpe WITH 2 PEERS
WAIT FOR TASKRUNNER defaulttaskbb.taskdb.sml.hpe
RESET TASKRUNNER defaulttaskbb.taskdb.sml.hpe
EXIT ON FAILURE OFF
# Build task was already run. Now build and run swarm run tasks
# Create and finalize swarm run task
EXIT ON FAILURE
create task from taskdefs/swarm_mnist_task.yaml
finalize task swarm_mnist_task
get task info swarm_mnist_task
get task body swarm_mnist_task
list tasks
EXIT ON FAILURE OFF
# Assign run task
EXIT ON FAILURE
RESET TASKRUNNER defaulttaskbb.taskdb.sml.hpe
ASSIGN TASK swarm_mnist_task TO defaulttaskbb.taskdb.sml.hpe WITH 2 PEERS
WAIT FOR TASKRUNNER defaulttaskbb.taskdb.sml.hpe
# Grace period for ML container to save the model,
# before the below reset command cleans up the ML and SL Containers.
SLEEP 15
RESET TASKRUNNER defaulttaskbb.taskdb.sml.hpe
EXIT ON FAILURE OFF
# List and reset training contract
EXIT ON FAILURE
LIST CONTRACTS
RESET CONTRACT defaultbb.cqdb.sml.hpe
EXIT ON FAILURE OFF
# Exit
EXIT