name: Fix issue 7
about: Federated learning blocks on Linux machines.
Summary
Allows for the running of the web server and model aggregation in separate processes so as not to have conflicts between pytorch and gevent causing blocking.
Motivation
This means that the library works on Linux machines without the use of workarounds.
Describe alternatives you've considered
This workaround to convert to numpy arrays and back is a simpler solution but less efficient.
Using base linux sockets rather than ZMQ would reduce dependencies but would make for a more complex codebase potentially increasing mistakes.
Not separating into multiple process but instead relying on threading or multiprocessing does not solve the problem due to gevent modifying global dependencies.
Additional context
This fix has been designed to not be a breaking change.
This update will not automatically fix this problem on Linux machines not using the included "federated average" algorithm. Custom algorithms would have to make the same change made to fed_avg_server.py as in this PR, shown here. We may want to consider obfuscating this functionality further by replacing DCFServer altogether with DCFServerHandler. This would upgrade users custom algorithms automatically.
name: Fix issue 7 about: Federated learning blocks on Linux machines.
Summary
Allows for the running of the web server and model aggregation in separate processes so as not to have conflicts between pytorch and gevent causing blocking.
Motivation
This means that the library works on Linux machines without the use of workarounds.
Describe alternatives you've considered
Additional context
fed_avg_server.py
as in this PR, shown here. We may want to consider obfuscating this functionality further by replacingDCFServer
altogether withDCFServerHandler
. This would upgrade users custom algorithms automatically.