File size: 2,702 Bytes
aa677e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# 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 <CONTAINER_ID> 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 <CONTAINER_ID>:/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`
|