# Execute Tests and Plots in Docker ## Quick Command Since Docker is running, execute this inside your container: ```bash cd /workspace/edgeeda-agent ./run_all.sh ``` Or if you're on the host: ```bash docker exec -it bash -c "cd /workspace/edgeeda-agent && ./run_all.sh" ``` ## What It Does 1. **Runs all agent tests** - Tests RandomSearch, SuccessiveHalving, and SurrogateUCB agents 2. **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: ```bash python3 run_tests_simple.py ``` ### Plots Only: ```bash python3 generate_plots.py --db runs/experiment.sqlite --out runs/plots ``` ## View Results ### Copy plots to host: ```bash docker cp :/workspace/edgeeda-agent/runs/plots ./runs/ ``` ### View in container: ```bash # 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`