Quick Start: Run Tests & Generate Plots
π One Command to Run Everything
Since Docker is running, execute this inside your Docker container:
cd /workspace/edgeeda-agent
./run_all.sh
π Step-by-Step (If you prefer)
1. Enter Docker Container
If you're on the host machine:
cd /Users/thalia/Desktop/EdgePPAgent/edgeeda-agent
docker run --rm -it -v "$(pwd)":/workspace/edgeeda-agent -w /workspace/edgeeda-agent edgeeda-agent bash
Or if container is already running:
docker exec -it <CONTAINER_ID> bash
2. Run Tests
cd /workspace/edgeeda-agent
python3 run_tests_simple.py
3. Generate Plots
python3 generate_plots.py --db runs/experiment.sqlite --out runs/plots
4. View Results
# List generated files
ls -lh runs/plots/
# View test results (already shown in console)
# View plots (copy to host if needed)
π Expected Output
Tests:
Running agent tests...
β
RandomSearchAgent
β
SuccessiveHalvingAgent
β
SurrogateUCBAgent
β
Metrics Flattening
β
Metrics Coercion
==================================================
Results: 5/5 tests passed
β
All tests passed!
Plots:
Loading data from runs/experiment.sqlite...
Found 11 trials
Successful: 3
With rewards: 0
Saved CSV to runs/plots/trials.csv
Generating plots...
β Saved success_rate.png
β Saved runtime_distribution.png
β Saved return_code_distribution.png
β Saved knob_PLACE_DENSITY.png
β Saved knob_CORE_UTILIZATION.png
β
All plots generated in runs/plots
π Generated Files
After running, you'll have in runs/plots/:
- trials.csv - Complete trial data
- success_rate.png - Success rate over time
- runtime_distribution.png - Runtime histogram
- return_code_distribution.png - Error breakdown
- knob_*.png - Knob value analysis (one per knob)
- learning_curve.png - Best reward over time (if rewards exist)
- area_vs_wns.png - Pareto plot (if metrics exist)
π§ Troubleshooting
"Permission denied" on run_all.sh:
chmod +x run_all.sh
"No module named 'pandas'":
- Make sure you're inside Docker container
- Run:
pip3 install -e .
"Database not found":
- Check:
ls -la runs/experiment.sqlite - If missing, run experiments first:
edgeeda tune --config configs/gcd_nangate45.yaml --budget 5
π‘ Pro Tip
Copy plots to host machine:
# From host (replace CONTAINER_ID)
docker cp <CONTAINER_ID>:/workspace/edgeeda-agent/runs/plots ./runs/