Skip to content

Commit

Permalink
Added load test based on shuffling numpy arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Hellander committed Mar 11, 2024
1 parent 9678042 commit 52e4b88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions examples/load-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,14 @@ tar -czvf package.tgz client
python client/entrypoint init_seed
```

### Deploy FEDn and two clients
docker-compose -f ../../docker-compose.yaml -f docker-compose.override.yaml up

### Initialize the FEDn network
### Initialize the FEDn network and run an experiment
Edit 'init_fedn.py' to configure the FEDn host (controller) to connect to, then
```
python init_fedn.py
```

Launch clients
> **Note**: run with `--scale client=N` to start *N* clients.
Launch clients and run a training session/experiment:

## Clean up
You can clean up by running `docker-compose down -v`.
```
python run_clients.py
```
4 changes: 2 additions & 2 deletions examples/load-test/run_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
}

result_fedavg = client.start_session(**session_config_fedavg)
while not client.session_is_finished(session_id):
time.sleep(2)
while not client.session_is_finished(session_config_fedavg['session_id']):
time.sleep(1)

# Disconnect clients
time.sleep(CLIENTS_AVAILABLE_TIME)
Expand Down

0 comments on commit 52e4b88

Please sign in to comment.