From 9817a5d703428da730cfe07224a393eda3d71eaf Mon Sep 17 00:00:00 2001 From: root Date: Fri, 7 Jun 2024 16:29:32 +0000 Subject: [PATCH] updated parameters. --- examples/monai-2D-mednist/README.rst | 19 ++++++++++++++++--- .../monai-2D-mednist/client_settings.yaml | 6 +++--- .../docker-compose.override.yaml | 2 ++ examples/monai-2D-mednist/requirements.txt | 8 -------- 4 files changed, 21 insertions(+), 14 deletions(-) delete mode 100644 examples/monai-2D-mednist/requirements.txt diff --git a/examples/monai-2D-mednist/README.rst b/examples/monai-2D-mednist/README.rst index 50f564d84..2e53e0329 100644 --- a/examples/monai-2D-mednist/README.rst +++ b/examples/monai-2D-mednist/README.rst @@ -62,8 +62,21 @@ Using FEDn Studio Follow the guide here to set up your FEDn Studio project and learn how to connect clients (using token authentication): `Studio guide `__. On the step "Upload Files", upload 'package.tgz' and 'seed.npz' created above. +Connecting clients: +=================== + +**NOTE: In case a different data path needs to be set, use the env variable FEDN_DATA_PATH.** + +.. code-block:: + + export FEDN_PACKAGE_EXTRACT_DIR=package + export FEDN_CLIENT_SETTINGS_PATH=./client_settings.yaml + fedn client start -in client.yaml --secure=True --force-ssl + + **NOTE: The following instructions are only for SDK-based client communication and for local development environments using Docker.** + Connecting clients using Docker: ================================ @@ -73,10 +86,10 @@ For convenience, there is a Docker image hosted on ghrc.io with fedn preinstalle docker run \ -v $PWD/client.yaml:/app/client.yaml \ + -v $PWD/client_settings.yaml:/app/client_settings.yaml \ -e FEDN_PACKAGE_EXTRACT_DIR=package \ - -e FEDN_NUM_DATA_SPLITS=2 \ - -e FEDN_DATA_PATH=/app/package/data/ \ - monai-2d-class-fedn:0.9.0 run client -in client.yaml --force-ssl --secure=True + -e FEDN_CLIENT_SETTINGS_PATH=/app/client_settings.yaml \ + ghcr.io/scaleoutsystems/fedn/fedn:0.9.0 run client -in client.yaml --force-ssl --secure=True Local development mode using Docker/docker compose diff --git a/examples/monai-2D-mednist/client_settings.yaml b/examples/monai-2D-mednist/client_settings.yaml index d9eb1a081..f3584e664 100644 --- a/examples/monai-2D-mednist/client_settings.yaml +++ b/examples/monai-2D-mednist/client_settings.yaml @@ -1,7 +1,7 @@ lr: 0.01 -batch_size: 256 +batch_size: 32 local_epochs: 10 num_workers: 1 -sample_size: 100 -split_index: 0 +sample_size: 30 +split_index: 4 diff --git a/examples/monai-2D-mednist/docker-compose.override.yaml b/examples/monai-2D-mednist/docker-compose.override.yaml index 21298b8a5..afeaf1437 100644 --- a/examples/monai-2D-mednist/docker-compose.override.yaml +++ b/examples/monai-2D-mednist/docker-compose.override.yaml @@ -16,10 +16,12 @@ services: environment: <<: *defaults FEDN_DATA_PATH: /app/package/client/data/MedNIST + FEDN_CLIENT_SETTINGS_PATH: /app/client_settings.yaml deploy: replicas: 1 volumes: - ${HOST_REPO_DIR:-.}/fedn:/app/fedn + - ${HOST_REPO_DIR:-.}/examples/monai-2D-mednist/client_settings.yaml:/app/client_settings.yaml client2: extends: diff --git a/examples/monai-2D-mednist/requirements.txt b/examples/monai-2D-mednist/requirements.txt deleted file mode 100644 index a37218f00..000000000 --- a/examples/monai-2D-mednist/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -setuptools -wheel==0.37.1 -torch==2.2.1 -torchvision==0.17.1 -fedn==0.9.0 -monai-weekly[pillow, tqdm] -scikit-learn -tensorboard