A framework for adaptive model partitioning and distributed inference on edge devices.
- Edge device simulation using Docker containers
- Model performance evaluation
- Resource usage monitoring
- Adaptive model optimization
- Python 3.10+
- Docker
- PyTorch 2.1.2+
- torchvision 0.16.2+
# Clone the repository
git clone https://github.com/yourusername/adaptive-edge-computing-framework.git
cd adaptive-edge-computing-framework
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# or
.venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txtRun different evaluation scenarios:
make evaluate
make evaluate-scale-up
make evaluate-scale-dow
Each evaluation will:
- Create Docker containers simulating edge devices
- Install necessary dependencies
- Run distributed inference tests
- Collect comprehensive performance metrics
View the results:
make show-resultsThe framework evaluates model performance under different configurations:
- Baseline: 2 cores, 2GB memory
- Distributed: 3 nodes
- Node 1: 1.0 core, 1GB (high)
- Node 2: 0.6 core, 512MB (medium)
- Node 3: 0.4 core, 512MB (low)
- Results:
Latency reduction: 78.35% Throughput improvement: 414.73% Scheduling overhead: 10.00ms
- Baseline: 3 cores, 3GB memory
- Distributed: 4 nodes
- Node 1: 1.0 core, 1GB
- Node 2: 1.0 core, 1GB
- Node 3: 0.6 core, 512MB
- Node 4: 0.4 core, 512MB
- Results:
Latency reduction: 77.17% Throughput improvement: 422.32% Scheduling overhead: 10.00ms
- Baseline: 1 core, 1GB memory
- Distributed: 2 nodes
- Node 1: 1.0 core, 1GB
- Node 2: 0.6 core, 512MB
- Results:
Latency reduction: 78.33% Throughput improvement: 425.73% Scheduling overhead: 10.00ms
-
Performance Improvement
- Consistent latency reduction (~78%) across configurations
- Significant throughput improvement (>400%)
- Stable scheduling overhead (10ms)
-
Scalability
- Effective resource utilization in all configurations
- Linear performance scaling with added nodes
- Minimal overhead increase with node count
-
Resource Efficiency
- Optimal task distribution across nodes
- Balanced resource utilization
- Adaptive load balancing
Adjust edge device constraints in src/docker_manager.py:
.
├── src/
│ ├── models/ # Model definitions
│ ├── utils/ # Utility functions
│ └── docker_manager.py # Edge device simulation
├── experiments/
│ └── evaluation/ # Performance evaluation
├── data/ # Dataset storage
└── results/ # Evaluation results
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.