# Quick Start: Run Tests & Generate Plots ## 🚀 One Command to Run Everything Since Docker is running, execute this **inside your Docker container**: ```bash cd /workspace/edgeeda-agent ./run_all.sh ``` ## 📋 Step-by-Step (If you prefer) ### 1. Enter Docker Container If you're on the host machine: ```bash 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: ```bash docker exec -it bash ``` ### 2. Run Tests ```bash cd /workspace/edgeeda-agent python3 run_tests_simple.py ``` ### 3. Generate Plots ```bash python3 generate_plots.py --db runs/experiment.sqlite --out runs/plots ``` ### 4. View Results ```bash # 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:** ```bash 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: ```bash # From host (replace CONTAINER_ID) docker cp :/workspace/edgeeda-agent/runs/plots ./runs/ ```