Skip to content

Commit

Permalink
Notebook for the initial FL analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanMSouza committed Jun 29, 2022
1 parent e19b580 commit 726a829
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Observer/src/docker-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports.getAllContainersInfosWithStats = async (nodes, port) => {
const containerInfos = await this.getAllContainersInfos(nodes, port);
for (const containerInfo of containerInfos) {
const stats = await this.getContainerStats(containerInfo.host, containerInfo.ID);
if (containerInfo.image === 'server') {
if (containerInfo.image === 'fl_server') {
const accuracy = await this.getServerAccuracy(containerInfo.ID, containerInfo.host);
if (accuracy >= 0) {
stats.accuracy = accuracy;
Expand Down
173 changes: 159 additions & 14 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ services:
environment:
- SERVER_IP=0.0.0.0:9999
- FRACTION_FIT=0.1
- MIN_FIT_CLIENTS=3
- MIN_AVAILABLE_CLIENTS=3
- NUM_ROUNDS=5
- MIN_FIT_CLIENTS=10
- MIN_AVAILABLE_CLIENTS=10
- NUM_ROUNDS=10
networks:
- default
restart: always
Expand All @@ -26,7 +26,7 @@ services:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=1
- NON_IID=0
- USER_ID=1

networks:
Expand All @@ -44,7 +44,7 @@ services:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=1
- NON_IID=0
- USER_ID=11

networks:
Expand All @@ -62,7 +62,7 @@ services:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=1
- NON_IID=0
- USER_ID=3

networks:
Expand All @@ -74,14 +74,15 @@ services:
constraints:
- node.role==worker

observer:
image: 'allanmsouza/motionsense:fl_observer'

client-2:
image: 'allanmsouza/motionsense:fl_client'
environment:
- EXPERIMENT_NAME=NormalFL
- WORKER_01=192.168.56.100
- WORKER_02=192.168.56.101
- WORKER_03=192.168.56.102
- MANAGER=192.168.56.103
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=0
- USER_ID=3

networks:
- default
Expand All @@ -90,6 +91,150 @@ services:
replicas: 1
placement:
constraints:
- node.role==manager
- node.role==worker

client-3:
image: 'allanmsouza/motionsense:fl_client'
environment:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=0
- USER_ID=3

networks:
- default
restart: always
deploy:
replicas: 1
placement:
constraints:
- node.role==worker

client-4:
image: 'allanmsouza/motionsense:fl_client'
environment:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=0
- USER_ID=3

networks:
- default
restart: always
deploy:
replicas: 1
placement:
constraints:
- node.role==worker

client-5:
image: 'allanmsouza/motionsense:fl_client'
environment:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=0
- USER_ID=3

networks:
- default
restart: always
deploy:
replicas: 1
placement:
constraints:
- node.role==worker


client-6:
image: 'allanmsouza/motionsense:fl_client'
environment:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=0
- USER_ID=3

networks:
- default
restart: always
deploy:
replicas: 1
placement:
constraints:
- node.role==worker

client-7:
image: 'allanmsouza/motionsense:fl_client'
environment:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=0
- USER_ID=3

networks:
- default
restart: always
deploy:
replicas: 1
placement:
constraints:
- node.role==worker

client-8:
image: 'allanmsouza/motionsense:fl_client'
environment:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=0
- USER_ID=3

networks:
- default
restart: always
deploy:
replicas: 1
placement:
constraints:
- node.role==worker

client-9:
image: 'allanmsouza/motionsense:fl_client'
environment:
- SERVER_IP=fl_server:9999
- COMPRESSION_METHOD=None
- BATCH_SIZE=32
- NON_IID=0
- USER_ID=3

networks:
- default
restart: always
deploy:
replicas: 1
placement:
constraints:
- node.role==worker
#observer:
# image: 'allanmsouza/motionsense:fl_observer'
# environment:
# - EXPERIMENT_NAME=NormalFL
# - WORKER_01=192.168.56.100
# - WORKER_02=192.168.56.101
# - WORKER_03=192.168.56.102
# - MANAGER=192.168.56.103
#
# networks:
# - default
# restart: always
# deploy:
# replicas: 1
# placement:
# constraints:
# - node.role==manager


0 comments on commit 726a829

Please sign in to comment.