Skip to content

Commit

Permalink
updating readme instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankJonasmoelle committed May 13, 2024
1 parent bfc544a commit ba8e04a
Showing 1 changed file with 52 additions and 3 deletions.
55 changes: 52 additions & 3 deletions examples/FedSimSiam/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Next, generate a seed model (the first model in a global model trail):
This will create a seed model called 'seed.npz' in the root of the project. This step will take a few minutes, depending on hardware and internet connection (builds a virtualenv).

FEDn Studio
-----------
Using FEDn Studio
-----------------

Follow the instructions to register for FEDN Studio and start a project (https://fedn.readthedocs.io/en/stable/studio.html).

Expand All @@ -73,4 +73,53 @@ FedSimSiam's encoder, and evaluated on the feature embeddings of the test images

This is a common method to track FedSimSiam's training progress, as FedSimSiam aims to minimize the distance between the embeddings of similar images.
A high accuracy implies that the feature embeddings for images within the same class are indeed close to each other in the
embedding space, i.e., FedSimSiam learned useful feature embeddings.
embedding space, i.e., FedSimSiam learned useful feature embeddings.


Running FEDn in local development mode:
---------------------------------------

Follow the steps above to install FEDn, generate 'package.tgz' and 'seed.tgz'.

Start a pseudo-distributed FEDn network using docker-compose:
.. code-block::
docker compose \
-f ../../docker-compose.yaml \
-f docker-compose.override.yaml \
up
This starts up local services for MongoDB, Minio, the API Server, one Combiner and two clients.
You can verify the deployment using these urls:

- API Server: http://localhost:8092/get_controller_status
- Minio: http://localhost:9000
- Mongo Express: http://localhost:8081

Upload the package and seed model to FEDn controller using the APIClient:

.. code-block::
from fedn import APIClient
client = APIClient(host="localhost", port=8092)
client.set_active_package("package.tgz", helper="numpyhelper")
client.set_active_model("seed.npz")
You can now start a training session with 100 rounds using the API client:

.. code-block::
client.start_session(rounds=100)
Clean up
--------

You can clean up by running

.. code-block::
docker-compose \
-f ../../docker-compose.yaml \
-f docker-compose.override.yaml \
down -v

0 comments on commit ba8e04a

Please sign in to comment.