Execute Tests and Plots in Docker
Quick Command
Since Docker is running, execute this inside your container:
cd /workspace/edgeeda-agent
./run_all.sh
Or if you're on the host:
docker exec -it <CONTAINER_ID> bash -c "cd /workspace/edgeeda-agent && ./run_all.sh"
What It Does
- Runs all agent tests - Tests RandomSearch, SuccessiveHalving, and SurrogateUCB agents
- Generates comprehensive plots - Creates visualization of your experiment data
Expected Output
==========================================
EdgeEDA-Agent: Tests and Plots
==========================================
Step 1: Running Agent Tests...
----------------------------------------
Running agent tests...
β
RandomSearchAgent
β
SuccessiveHalvingAgent
β
SurrogateUCBAgent
β
Metrics Flattening
β
Metrics Coercion
==================================================
Results: 5/5 tests passed
β
All tests passed!
Step 2: Generating Plots...
----------------------------------------
Loading data from runs/experiment.sqlite...
Found 11 trials
Successful: 3
With rewards: 0
Saved CSV to runs/plots/trials.csv
Generating plots...
Generating additional analysis 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
==========================================
Summary
==========================================
β
Tests: PASSED
β
Plots: Generated successfully
Generated files in runs/plots/:
- runs/plots/trials.csv (2.5K)
- runs/plots/success_rate.png (45K)
- runs/plots/runtime_distribution.png (38K)
- runs/plots/return_code_distribution.png (42K)
- runs/plots/knob_PLACE_DENSITY.png (35K)
- runs/plots/knob_CORE_UTILIZATION.png (36K)
==========================================
Manual Execution
If you prefer to run steps separately:
Tests Only:
python3 run_tests_simple.py
Plots Only:
python3 generate_plots.py --db runs/experiment.sqlite --out runs/plots
View Results
Copy plots to host:
docker cp <CONTAINER_ID>:/workspace/edgeeda-agent/runs/plots ./runs/
View in container:
# List generated files
ls -lh runs/plots/
# View CSV
head runs/plots/trials.csv
Troubleshooting
Issue: "Permission denied" on run_all.sh
Fix: chmod +x run_all.sh
Issue: "No module named 'pandas'" Solution: Make sure you're inside Docker container where dependencies are installed
Issue: "Database not found"
Solution: Check if experiments have been run: ls -la runs/experiment.sqlite