Skip to content

Commit 9fe994c

Browse files
authored
Merge pull request #98 from GunashekarKM/master
Generic Wheel file & Broken URLs
2 parents 0ec8000 + d01c76a commit 9fe994c

File tree

13 files changed

+30
-36
lines changed

13 files changed

+30
-36
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Swarm Learning nodes works in collaboration with other Swarm Learning nodes in t
4141

4242
## User ML components
4343

44-
User can transform any Keras or PyTorch based ML program that is written using Python3 into a Swarm Learning ML program by [making a few simple changes](./docs/User/How_to_Swarm_enable_an_ML_algorithm.md) to the model training code by including the `SwarmCallback` API. For more information, see the [examples](./docs/User/Examples.md) included with the Swarm Learning package for a sample code.
44+
User can transform any Keras or PyTorch based ML program that is written using Python3 into a Swarm Learning ML program by [making a few simple changes](./docs/User/How_to_Swarm_enable_an_ML_algorithm.md) to the model training code by including the `SwarmCallback` API. For more information, see any of the [examples](/examples/README.md) included with the Swarm Learning package for a sample code.
4545

4646
The transformed user Machine Learning \(user ML node\) program can be run on the host or user can build it as a Docker container.
4747

@@ -63,7 +63,7 @@ NOTE: All the ML nodes must use the same ML platform either Keras (based on Tens
6363
**Caution**: Users are recommended not to save their model related artifacts under this folder, as future version upgrade of Swarm Learning would delete these folders.
6464
- [Upgrading from earlier evaluation versions](/docs/Install/Versioning_and_upgrade.md)
6565
- [Download and setup Swarm Learning](/docs/Install/HPE_Swarm_Learning_installation.md) using the Web UI installer
66-
- Execute [MNIST example](/docs/User/MNIST.md)
66+
- Execute [MNIST example](/examples/mnist/MNIST.md)
6767
- [Frequently Asked Questions](/docs/User/Frequently_asked_questions.md)
6868
- [Troubleshooting](/docs/User/Troubleshooting.md)
6969

docs/User/Examples.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/User/Task_for_building_the_user_container.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Body:
1818
- ' keras matplotlib opencv-python pandas protobuf==3.15.6 sklearn'
1919
- ' '
2020
- RUN mkdir -p /tmp/hpe-swarmcli-pkg
21-
- COPY swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl /tmp/hpe-swarmcli-pkg/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl
22-
- RUN pip3 install /tmp/hpe-swarmcli-pkg/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl
21+
- COPY swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl /tmp/hpe-swarmcli-pkg/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl
22+
- RUN pip3 install /tmp/hpe-swarmcli-pkg/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl
2323
```
2424

examples/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
## Prerequisite for all examples
2-
Start license server and install valid license before running any of the examples. Refer [Installing licenses and starting license server](/docs/Install/HPE_Swarm_Learning_installation.md).
2+
1. Start license server and install valid license before running any of the examples. Refer [Installing licenses and starting license server](/docs/Install/HPE_Swarm_Learning_installation.md).
33

4+
2. Install the Swarm Learning product using the Web UI installer. Refer [Web UI installation](/docs/Install/HPE_Swarm_Learning_installation.md)
5+
6+
3. All the examples refer to a generic Swarm Learning client python wheel file. Create a symbolic link to the actual wheel file version, before running the examples
7+
```
8+
cd swarm-learning/lib
9+
ln -fs swarmlearning-1.0.1-py3-none-manylinux_2_24_x86_64.whl swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl
10+
```
11+
412
## Swarm Learning Examples
513

614
Several examples of using Swarm Learning are provided with the package.
@@ -16,5 +24,5 @@ For details of running each example, see the below:
1624

1725
- [MNIST](/examples/mnist/MNIST.md)
1826
- [MNIST-PYT](/examples/mnist-pyt/MNIST-PYT.md)
19-
- [CIFAR-10](/examples/cifar/CIFAR-10.md)
27+
- [CIFAR-10](/examples/cifar10/CIFAR-10.md)
2028
- [Credit card fraud detection](/examples/fraud-detection/Credit_card_fraud_detection.md)

examples/cifar10/CIFAR-10.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This example shows the Swarm training of Keras based CIFAR-10 model using two ML
1010

1111
The following image illustrates a cluster setup for the CIFAR-10 example:
1212

13-
![CIFAR-10 Cluster Setup](GUID-4D303DEC-8E71-43F4-BDCB-04B0C1AE79D8-high.png)
13+
![CIFAR-10 Cluster Setup](/docs/User/GUID-4D303DEC-8E71-43F4-BDCB-04B0C1AE79D8-high.png)
1414

1515
- This example uses one SN node. SN1 is the name of the Docker container that runs on host 172.1.1.1.
1616

@@ -70,7 +70,7 @@ cp -r examples/utils/gen-cert workspace/cifar10/
7070
5. On both host-1 and host-2, copy Swarm Learning wheel file inside build context and build Docker image for ML that contains environment to run Swarm training of user models.
7171
7272
```
73-
cp lib/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl workspace/cifar10/ml-context/
73+
cp -L lib/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl workspace/cifar10/ml-context/
7474
docker build -t user-ml-env-tf2.7.0 workspace/cifar10/ml-context
7575
```
7676
You may need to specify the correct https_proxy for the docker build if you are behind a firewall. For eg,

examples/cifar10/ml-context/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
FROM tensorflow/tensorflow:2.7.0
77

8-
COPY requirements.txt swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl /tmp/swarmlib/
8+
COPY requirements.txt swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl /tmp/swarmlib/
99

1010
# Install ml environment packages
1111
RUN pip3 install --upgrade pip && pip3 install -r /tmp/swarmlib/requirements.txt
1212

1313
# Install SwarmLearning package
14-
RUN pip3 install /tmp/swarmlib/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl
14+
RUN pip3 install /tmp/swarmlib/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl

examples/fraud-detection/Credit_card_fraud_detection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This example shows the Swarm training of the credit card fraud detection model u
1717

1818
The following image illustrates a cluster setup that uses only one host:
1919

20-
![Credit Card Fraud Detection](GUID-BE2185B8-5C3B-4BD3-91FF-9ABC77D0720C-high.png)
20+
![Credit Card Fraud Detection](/docs/User/GUID-BE2185B8-5C3B-4BD3-91FF-9ABC77D0720C-high.png)
2121

2222
- This example uses one SN node. The names of the docker containers representing this node is SN1. SN1 is also the Sentinel Node. SN1 runs on the host 172.1.1.1.
2323

@@ -74,7 +74,7 @@ mv workspace/fraud-detection/data-and-scratch workspace/fraud-detection/user4/
7474
```
7575
docker volume create sl-cli-lib
7676
docker container create --name helper -v sl-cli-lib:/data hub.myenterpriselicense.hpe.com/hpe_eval/swarm-learning/sn:1.0.0
77-
docker cp lib/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl helper:/data
77+
docker cp -L lib/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl helper:/data
7878
docker rm helper
7979

8080
```

examples/fraud-detection/swci/taskdefs/user_env_tf_build_task.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ Body:
1616
- ' keras matplotlib opencv-python pandas protobuf==3.15.6 '
1717
- ' '
1818
- RUN mkdir -p /tmp/hpe-swarmcli-pkg
19-
- COPY swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl /tmp/hpe-swarmcli-pkg/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl
20-
- RUN pip3 install /tmp/hpe-swarmcli-pkg/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl
19+
- COPY swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl /tmp/hpe-swarmcli-pkg/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl
20+
- RUN pip3 install /tmp/hpe-swarmcli-pkg/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl
2121

examples/mnist-pyt/MNIST-PYT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The Machine Learning program, after conversion to Swarm Learning for the PyTorch
1414

1515
This example shows the Swarm training of MNIST model using four ML nodes. ML nodes along with SL nodes are automatically spawned by SWOP nodes running on two different hosts. Swarm training is initiated by SWCI node and orchestrated by two SN nodes running in different hosts. This example also shows how private data, private scratch area and shared model can be mounted to ML nodes for Swarm training.
1616

17-
The following image illustrates a cluster setup for the MNIST example:![Four cluster setup](GUID-25587679-1F3A-43DC-8D02-48E6BEFF7DA6-high.png)
17+
The following image illustrates a cluster setup for the MNIST example:![Four cluster setup](/docs/User/GUID-25587679-1F3A-43DC-8D02-48E6BEFF7DA6-high.png)
1818

1919
- This example uses two SN nodes. The names of the docker containers representing these two nodes are SN1 and SN2. SN1 is the Sentinel Node. SN1 runs on host 172.1.1.1 and SN2 runs on host 172.2.2.2.
2020

@@ -109,7 +109,7 @@ sed -i "s+<CURRENT-PATH>+$(pwd)+g" workspace/mnist-pyt/swop/swop*_profile.yaml w
109109
```
110110
docker volume create sl-cli-lib
111111
docker container create --name helper -v sl-cli-lib:/data hub.myenterpriselicense.hpe.com/hpe_eval/swarm-learning/sn:1.0.0
112-
docker cp lib/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl helper:/data
112+
docker cp -L lib/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl helper:/data
113113
docker rm helper
114114
```
115115

examples/mnist-pyt/swci/taskdefs/user_env_pyt_build_task.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Body:
2222
- ' matplotlib opencv-python pandas sklearn'
2323
- ' '
2424
- RUN mkdir -p /tmp/hpe-swarmcli-pkg
25-
- COPY swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl /tmp/hpe-swarmcli-pkg/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl
26-
- RUN pip3 install /tmp/hpe-swarmcli-pkg/swarmlearning-1.0.0-py3-none-manylinux_2_24_x86_64.whl
25+
- COPY swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl /tmp/hpe-swarmcli-pkg/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl
26+
- RUN pip3 install /tmp/hpe-swarmcli-pkg/swarmlearning-client-py3-none-manylinux_2_24_x86_64.whl

0 commit comments

Comments
 (0)