Examples for Running a Federation

OpenFL currently offers four ways to set up and run experiments with a federation: the Task Runner API, Python Native API, the Interactive API, and the Workflow API. the Task Runner API is advised for production scenarios where the workload needs to be verified prior to execution, whereas the python native API provides a clean python interface on top of it intended for simulation purposes. The Interactive API introduces a convenient way to set up a federation and brings “long-lived” components in a federation (“Director” and “Envoy”), while the Task Runner API workflow is advised for scenarios where the workload needs to be verified prior to execution. In contrast, the currently experimental Workflow API is introduced to provide significant flexility to researchers and developers in the construction of federated learning experiments.

As OpenFL nears it’s 2.0 release, we expect to consolidate these APIs and make the Workflow API the primary interface going forward. See our roadmap for more details.

Task Runner API

Formulate the experiment as a series of tasks coordinated by a Federated Learning Plan

See Task Runner API

Python Native API

Intended for quick simulation purposes

See Python Native API: Federated PyTorch MNIST

Interactive API

Setup long-lived components to run many experiments

See Interactive API: MNIST Classification Tutorial

Workflow Interface (Experimental)

Formulate the experiment as a series of tasks, or a flow.

See Workflow Interface: Federated PyTorch MNIST

Note

Please visit repository for a full list of tutorials