🔥 Created entirely by Memex 🔥
Not a single line of this project was written by a human! The entire codebase, including this README, was generated by the Memex coding agent. From system architecture to implementation, from visualization to documentation - it's all AI-powered! 🚀
A complete federated learning system implemented in Rust with real-time visualization and monitoring capabilities. The system demonstrates the practical implementation of federated learning principles, where multiple workers train on their local data while contributing to a global model.
- Coordinator: Central server managing the federated learning process
- Global model aggregation
- Worker registration and management
- Training coordination
- Workers: Distributed training nodes
- Local model training
- Parameter updates
- Model synchronization
- Model: Linear model implementation with serialization support
- Parameter management
- Forward pass computation
- Federated averaging implementation
- Real-time Dashboard: Built with Streamlit
- Training progress visualization
- Worker performance monitoring
- Convergence analysis
- System metrics
- Worker Simulation: Testing and demonstration
- Simulated distributed training
- Configurable worker behavior
- Real-time updates
- Rust 2021 edition
- Dependencies:
- tokio (async runtime)
- axum (web framework)
- ndarray (numerical computations)
- serde (serialization)
- Python 3.9+
- Dependencies:
- streamlit
- plotly
- pandas
- numpy
# Clone the repository
git clone https://github.com/davidvgilmore/fl-system-rust.git
cd fl-system-rust
# Build Rust components
cargo build
# Set up Python environment
python -m venv .venv
source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
pip install -r dashboard/requirements.txt- Start the Rust server:
cargo run- Launch the Streamlit dashboard:
streamlit run dashboard/app.py- Run worker simulation (optional):
python dashboard/simulate_workers.py.
├── src/
│ ├── main.rs # Server implementation
│ ├── coordinator.rs # Federated learning coordinator
│ ├── worker.rs # Worker implementation
│ └── model.rs # Linear model and federated averaging
├── dashboard/
│ ├── app.py # Streamlit dashboard
│ └── simulate_workers.py # Worker simulation
└── README.md
- Asynchronous Communication: Built on tokio for efficient async operations
- Real-time Monitoring: Live training progress and performance metrics
- Federated Averaging: Efficient model parameter aggregation
- Interactive Dashboard: Rich visualizations and system insights
- Scalable Architecture: Support for multiple concurrent workers
- Robust Error Handling: Graceful handling of worker failures and edge cases
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.