edgeeda-agent / QUICK_START.md
SamChYe's picture
Publish EdgeEDA agent
aa677e3 verified

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/