Skip to content

Commit

Permalink
Feature/SK-817: Update asyc-client entrypoints to support new feature…
Browse files Browse the repository at this point in the history
…s in the CLI (#588)
  • Loading branch information
ahellander authored Apr 24, 2024
1 parent c496e3f commit 56df5cb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/async-clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ pip install -r requirements.txt
Create the compute package and seed model:
```
tar -czvf package.tgz client
fedn package create --path client
```
```
python client/entrypoint init_seed
fedn run build --path client
```
You will now have a file 'seed.npz' in the directory.
Expand Down
6 changes: 4 additions & 2 deletions examples/async-clients/client/fedn.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
entry_points:
build:
command: python entrypoint.py init_seed ../seed.npz
train:
command: python entrypoint.py train $ENTRYPOINT_OPTS
command: python entrypoint.py train
validate:
command: python entrypoint.py validate $ENTRYPOINT_OPTS
command: python entrypoint.py validate
4 changes: 3 additions & 1 deletion examples/async-clients/run_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@

from fedn.network.clients.client import Client

# Use with a local deployment
settings = {
'DISCOVER_HOST': '127.0.0.1',
'DISCOVER_PORT': 8092,
'TOKEN': None,
'N_CLIENTS': 10,
'N_CYCLES': 100,
'CLIENTS_MAX_DELAY': 10,
'CLIENTS_ONLINE_FOR_SECONDS': 120
}

client_config = {'discover_host': settings['DISCOVER_HOST'], 'discover_port': settings['DISCOVER_PORT'], 'token': None, 'name': 'testclient',
client_config = {'discover_host': settings['DISCOVER_HOST'], 'discover_port': settings['DISCOVER_PORT'], 'token': settings['TOKEN'], 'name': 'testclient',
'client_id': 1, 'remote_compute_context': True, 'force_ssl': False, 'dry_run': False, 'secure': False,
'preshared_cert': False, 'verify': False, 'preferred_combiner': False,
'validator': True, 'trainer': True, 'init': None, 'logfile': 'test.log', 'heartbeat_interval': 2,
Expand Down

0 comments on commit 56df5cb

Please sign in to comment.