Skip to main content

PyFed is an open-source framework for federated learning algorithms.

Project description

PyFed

PyFed is an open-source framework for federated learning. PyFed is fairly straightforward and brief in comparison to other federated learning frameworks. Furthermore, it allows running federated learning algorithms with any Tensorflow dataset on any preprocessed dataset. PyFed introduces several methods of federated learning implementation such as running multiple processes on a single machine and training on various systems. In addition, PyFed employs Tensorboard to demonstrate the history of training of each client and assess loss and accuracy of each client per round.
PyFed implements FL using sockets, processes, and threads. Simply put, each client will run its particular process and tries to establish a socket connection with the server, which also has its specific process. Once initiated, each connection will be handled by one thread of the server's process. Each thread will communicate with its respective client to receive the trained weights per round. Once they receive the result of one round, threads will return the weights to the server's process, which will arrive at a new model using the mentioned weights. The server will send the new model to the clients using newly initiated threads.
PyFed is mainly based on two classes:

  • FL_Server: which represents the server to which clients communicate in a federated learning problem. The train() function of this class handles socket connections and the FL policy.
  • FL_Client: which represents each client in a federated learning network. An object of this class handles training procedure of any global model on any local data.

PyFed can run federated learning in 2 ways:

  1. Running FL only on one system and using separate processes.
  2. Running FL on multiple systems.

Tutorials and installation guides are mentioned on PyFed webpage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfed-0.0.35.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfed-0.0.35-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pyfed-0.0.35.tar.gz.

File metadata

  • Download URL: pyfed-0.0.35.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for pyfed-0.0.35.tar.gz
Algorithm Hash digest
SHA256 afbdc66341c761a72928d95d1d5af3175a3621b4d22c031d169efad56f269696
MD5 935a39570f7aba43fd94dd4fbece4231
BLAKE2b-256 bfb51cdfa1e536068b22760eb861e671a8abdea11b0ca592f17aecc2fc12f371

See more details on using hashes here.

File details

Details for the file pyfed-0.0.35-py3-none-any.whl.

File metadata

  • Download URL: pyfed-0.0.35-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for pyfed-0.0.35-py3-none-any.whl
Algorithm Hash digest
SHA256 dd179cf7afb3976fef2c4aa6498c0c29ead56561f711d87467e667774130f95b
MD5 cf06a6f38a0d27d1cb71bbe45c69ab4e
BLAKE2b-256 b9c9a3316d0cb9f54681ef917443b3b4d4b8ce0e4bc474148d93a34404eaf8ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page