Skip to content

KT19/federated-learning-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Federated Learning Simulator

This repository provides a modular Federated Learning (FL) simulator built with PyTorch. It supports both single-machine simulation and LAN-distributed remote clients (e.g., another PC on your local network).

Features

  • Modular OOP-based FL architecture

  • Local clients (GPU/CPU) + optional remote clients over LAN

  • YAML-based configuration

  • Managed with the uv package manager

  • Easy to extend for research or custom FL strategies

Getting Started

  1. Install Dependencies

The environment is managed with the uv package manager.

uv sync

  1. Move to the Scripts Directory

cd scripts

  1. Configure the Simulation

All settings can be customized via YAML.

Edit:

configs/FLSimulatorConfig.yaml

  1. (Optional) Launch Remote Clients

If you want to include devices on the LAN (e.g., another PC):

On each remote machine:

uv run uvicorn remote:app

Make sure these clients stay running during the simulation.

  1. (Optional) Configure Remote Client Addresses

After launching remote clients, set their ip_address and port in:

configs/RemoteClientConfig.yaml

  1. Run the Simulation

uv run main.py

Note: Start all remote clients before running the simulation.

About

Federated Learning Simulation built with PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages