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

Run Your First Example

  1. Clone the examples:

$ git clone https://github.com/NVIDIA/NVFlare.git
$ cd NVFlare/examples/hello-world/hello-pt
  1. Install example dependencies:

$ pip install -r requirements.txt
  1. 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:

  1. Learn more about different ways to run NVFlare in the Getting Started guide

  2. Explore more examples in the Example Applications section

  3. When ready for production, see Real-World Federated Learning for deployment guidance

  4. For development, see Programming Guide