How fedml-ai/fedml works
FedML is a unified machine-learning platform spanning federated training, job orchestration, model serving, storage, and mobile edge execution. A typical user configures or submits a job through the Python API/CLI; the scheduler provisions and runs it, while compute components perform training or serving and report results. The Android SDK adds on-device federated training. The README documents these capabilities, while the sampled excerpts show only selected implementation details, so links between broader subsystems are limited to documented relationships.
Main entry points: launch_manager.py Launch Manager · scheduler Scheduler Runtime · EdgeService.java Edge Service · modules Python API
Components 23
Developer Interfaces
- FedML CLI
python/fedml/cli/cli.py - Python API
python/fedml/api/modules - Framework Init
python/fedml/__init__.py - Storage API
python/fedml/api/modules/storage.py
Job Orchestration
- Launch Manager
python/fedml/computing/scheduler/scheduler_entry/launch_manager.py - Scheduler Runtime
python/fedml/computing/scheduler - Run Arguments
python/fedml/arguments.py
Training Compute
- Federated Runner
python/fedml/runner.py - Algorithm Frame
python/fedml/core/alg_frame - LLM Job
python/spotlight_prj/fedllm/run_fedllm.py - LLM Trainer
python/fedml/train/llm/hf_trainer.py - ML Engine Adapter
python/fedml/ml/engine/ml_engine_adapter.py - S3 Object Storage
python/fedml/core/distributed/communication/s3/remote_storage.py
Model Deployment
- Model Deployment
python/fedml/computing/scheduler/model_scheduler/device_model_deployment.py - Model Inference
python/fedml/computing/scheduler/model_scheduler/device_model_inference.py - Device Client
python/fedml/computing/scheduler/model_scheduler/device_client_runner.py
Mobile Edge
- Edge App
android/app/src/main/java/ai/fedml/ui/HomeActivity.java - Edge Service
android/fedmlsdk/src/main/java/ai/fedml/edge/service/EdgeService.java - Edge Training API
android/fedmlsdk/src/main/java/ai/fedml/edge/service/FedEdgeTrainImpl.java - Native Trainer
android/fedmlsdk/MobileNN/src/train/FedMLTrainer.cpp
Other components
- Developer
- Mobile User
- FedML Cloud
Connections 20
- Developer → FedML CLI: runs commands
- Developer → Python API: submits jobs
- FedML CLI → Python API: invokes operations
- Python API → Launch Manager: requests launch
python/fedml/computing/scheduler/scheduler_entry/launch_manager.py - Framework Init → Run Arguments: loads arguments
python/fedml/__init__.py - Launch Manager → Scheduler Runtime: orchestrates jobs
python/fedml/computing/scheduler/scheduler_entry/launch_manager.py - Launch Manager → Run Arguments: uses configuration
python/fedml/computing/scheduler/scheduler_entry/launch_manager.py - Scheduler Runtime → Federated Runner: runs workloads
- Federated Runner → Algorithm Frame: uses algorithms
- LLM Job → LLM Trainer: creates trainer
python/spotlight_prj/fedllm/run_fedllm.py - LLM Trainer → ML Engine Adapter: uses backend
- Storage API → S3 Object Storage: uses S3 storage
python/fedml/api/modules/storage.py - Scheduler Runtime → Model Deployment: provisions serving
- Model Deployment → Model Inference: hosts inference
- Device Client → Model Inference: requests inference
- Mobile User → Edge App: uses app
- Edge App → Edge Service: starts training
- Edge Service → Edge Training API: initializes training
android/fedmlsdk/src/main/java/ai/fedml/edge/service/EdgeService.java - Edge Training API → Native Trainer: delegates training
- Edge Service → FedML Cloud: communicates