Quickstart¶
This guide will get you running a simple federated learning example in minutes. Make sure you have completed the Installation steps before proceeding.
Prerequisites¶
Python 3.9+
pip
Git
NVFlare installed (see Installation)
Run Your First Example¶
Clone the examples:
$ git clone https://github.com/NVIDIA/NVFlare.git
$ cd NVFlare/examples/hello-world/hello-pt
Install example dependencies:
$ pip install -r requirements.txt
Run the example:
$ python fedavg_script_runner_pt.py
That’s it! You should see the federated learning simulation running with two clients training a model together.
Understanding the Example¶
This example demonstrates a simple federated learning scenario using PyTorch. For a detailed explanation of:
How the example works
The neural network architecture
The federated learning workflow
PyTorch integration details
See the Hello PyTorch with Job API guide and the FedJob API documentation.
Next Steps¶
Now that you’ve run your first example:
Learn more about different ways to run NVFlare in the Getting Started guide
Explore more examples in the Example Applications section
When ready for production, see Real-World Federated Learning for deployment guidance
For development, see Programming Guide