{"id":19733969,"url":"https://github.com/scaleoutsystems/fedn-edge-demo-nanos","last_synced_at":"2026-05-15T04:02:33.707Z","repository":{"id":235449549,"uuid":"790631226","full_name":"scaleoutsystems/fedn-edge-demo-nanos","owner":"scaleoutsystems","description":"Project used for the edge learning setup with Jetson Nanos","archived":false,"fork":false,"pushed_at":"2024-04-23T09:14:27.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-11-23T04:21:03.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scaleoutsystems.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-23T08:33:58.000Z","updated_at":"2024-04-23T09:14:31.000Z","dependencies_parsed_at":"2024-04-23T13:20:44.494Z","dependency_job_id":null,"html_url":"https://github.com/scaleoutsystems/fedn-edge-demo-nanos","commit_stats":null,"previous_names":["scaleoutsystems/fedn-edge-demo-nanos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scaleoutsystems/fedn-edge-demo-nanos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleoutsystems%2Ffedn-edge-demo-nanos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleoutsystems%2Ffedn-edge-demo-nanos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleoutsystems%2Ffedn-edge-demo-nanos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleoutsystems%2Ffedn-edge-demo-nanos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scaleoutsystems","download_url":"https://codeload.github.com/scaleoutsystems/fedn-edge-demo-nanos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleoutsystems%2Ffedn-edge-demo-nanos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33053144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T00:34:49.337Z","updated_at":"2026-05-15T04:02:33.682Z","avatar_url":"https://github.com/scaleoutsystems.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"FEDn Project: MNIST (PyTorch)\n-----------------------------\n\nThis is an example FEDn Project based on the classic hand-written text recognition dataset MNIST. \nThe example is intented as a minimalistic quickstart and automates the handling of training data\nby letting the client download and create its partition of the dataset as it starts up.\n\n   **Note: These instructions are geared towards users seeking to learn how to work \n   with FEDn in local development mode using Docker/docker-compose. We recommend all new users \n   to start by following the Quickstart Tutorial: https://fedn.readthedocs.io/en/stable/quickstart.html** \n\nPrerequisites\n-------------\n\nUsing FEDn Studio:\n\n-  `Python 3.8, 3.9, 3.10 or 3.11 \u003chttps://www.python.org/downloads\u003e`__\n-  `A FEDn Studio account \u003chttps://fedn.scaleoutsystems.com/signup\u003e`__   \n\nIf using pseudo-distributed mode with docker-compose:\n\n-  `Docker \u003chttps://docs.docker.com/get-docker\u003e`__\n-  `Docker Compose \u003chttps://docs.docker.com/compose/install\u003e`__\n\nCreating the compute package and seed model\n-------------------------------------------\n\nInstall fedn: \n\n.. code-block::\n\n   pip install fedn\n\nClone this repository, then locate into this directory:\n\n.. code-block::\n\n   git clone https://github.com/scaleoutsystems/fedn.git\n   cd fedn/examples/mnist-pytorch\n\nCreate the compute package:\n\n.. code-block::\n\n   fedn package create --path client\n\nThis should create a file 'package.tgz' in the project folder.\n\nNext, generate a seed model (the first model in a global model trail):\n\n.. code-block::\n\n   fedn run build --path client\n\nThis 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).  \n\nUsing FEDn Studio\n-----------------\n\nFollow the guide here to set up your FEDn Studio project and learn how to connect clients (using token authentication): `Studio guide \u003chttps://fedn.readthedocs.io/en/stable/studio.html\u003e`__.\nOn the step \"Upload Files\", upload 'package.tgz' and 'seed.npz' created above. \n\n\nModifing the data split:\n========================\n\nThe default traning and test data  for this example is downloaded and split direcly by the client when it starts up (see 'startup' entrypoint). \nThe number of splits and which split used by a client can be controlled via the environment variables ``FEDN_NUM_DATA_SPLITS`` and ``FEDN_DATA_PATH``.\nFor example, to split the data in 10 parts and start a client using the 8th partiton:\n\n.. code-block::\n\n   export FEDN_PACKAGE_EXTRACT_DIR=package\n   export FEDN_NUM_DATA_SPLITS=10\n   export FEDN_DATA_PATH=package/data/clients/8/mnist.pt\n   fedn run client -in client.yaml --secure=True --force-ssl\n\nThe default is to split the data into 2 partitions and use the first partition. \n\n\nConnecting clients using Docker:\n================================\n\nFor convenience, there is a Docker image hosted on ghrc.io with fedn preinstalled. To start a client using Docker: \n\n.. code-block::\n\n   docker run \\\n     -v $PWD/client.yaml:/app/client.yaml \\\n     -e FEDN_PACKAGE_EXTRACT_DIR=package \\\n     -e FEDN_NUM_DATA_SPLITS=2 \\\n     -e FEDN_DATA_PATH=/app/package/data/clients/1/mnist.pt \\\n     ghcr.io/scaleoutsystems/fedn/fedn:0.9.0 run client -in client.yaml --force-ssl --secure=True\n\n\nLocal development mode using Docker/docker compose\n--------------------------------------------------\n\nFollow the steps above to install FEDn, generate 'package.tgz' and 'seed.tgz'.\n\nStart a pseudo-distributed FEDn network using docker-compose:\n\n.. code-block::\n\n   docker compose \\\n    -f ../../docker-compose.yaml \\\n    -f docker-compose.override.yaml \\\n    up\n\nThis starts up local services for MongoDB, Minio, the API Server, one Combiner and two clients. \nYou can verify the deployment using these urls: \n\n- API Server: http://localhost:8092/get_controller_status\n- Minio: http://localhost:9000\n- Mongo Express: http://localhost:8081\n\nUpload the package and seed model to FEDn controller using the APIClient. In Python:\n\n.. code-block::\n\n   from fedn import APIClient\n   client = APIClient(host=\"localhost\", port=8092)\n   client.set_active_package(\"package.tgz\", helper=\"numpyhelper\")\n   client.set_active_model(\"seed.npz\")\n\nYou can now start a training session with 5 rounds (default): \n\n.. code-block::\n\n   client.start_session()\n\nAutomate experimentation with several clients  \n=============================================\n\nIf you want to scale the number of clients, you can do so by modifying ``docker-compose.override.yaml``. For example, \nin order to run with 3 clients, change the environment variable ``FEDN_NUM_DATA_SPLITS`` to 3, and add one more client \nby copying ``client1`` and setting ``FEDN_DATA_PATH`` to ``/app/package/data/clients/3/mnist.pt``\n\n\nAccess message logs and validation data from MongoDB  \n====================================================\n\nYou can access and download event logs and validation data via the API, and you can also as a developer obtain \nthe MongoDB backend data using pymongo or via the MongoExpress interface: \n\n- http://localhost:8081/db/fedn-network/ \n\nThe credentials are as set in docker-compose.yaml in the root of the repository. \n\nAccess global models   \n====================\n\nYou can obtain global model updates from the 'fedn-models' bucket in Minio: \n\n- http://localhost:9000\n\nReset the FEDn deployment   \n=========================\n\nTo purge all data from a deployment incuding all session and round data, access the MongoExpress UI interface and \ndelete the entire ``fedn-network`` collection. Then restart all services. \n\nClean up\n========\nYou can clean up by running \n\n.. code-block::\n\n   docker-compose -f ../../docker-compose.yaml -f docker-compose.override.yaml down -v\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleoutsystems%2Ffedn-edge-demo-nanos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaleoutsystems%2Ffedn-edge-demo-nanos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleoutsystems%2Ffedn-edge-demo-nanos/lists"}