| #!/bin/bash |
| |
| |
| set -euo pipefail |
| pip install -q "transformers==4.46.2" "huggingface_hub<1.0" "datasets<4" "accelerate" 2>&1 | tail -1 |
|
|
| python -c " |
| from huggingface_hub import snapshot_download |
| snapshot_download('ashishk1331/ccd-repro-code', repo_type='dataset', local_dir='/work') |
| print('code downloaded') |
| " |
| cd /work |
| nvidia-smi --query-gpu=name,memory.total --format=csv |
|
|
| |
| python scripts/run_eval.py --task trip --method baseline --limit 2 --out outputs/probe_trip_base.json |
| python scripts/run_eval.py --task trip --method ccd_ds --limit 2 --out outputs/probe_trip_ds.json |
| python scripts/run_eval.py --task humaneval --method baseline --limit 2 --out outputs/probe_he_base.json |
| python scripts/run_eval.py --task humaneval --method ccd_ds --limit 2 --out outputs/probe_he_ds.json |
|
|
| python - <<'EOF' |
| import json, glob |
| print("\n================ PROBE SUMMARY ================") |
| for f in sorted(glob.glob("outputs/probe_*.json")): |
| r = json.load(open(f)) |
| tot = sum(r["per_example_steps"]) |
| print(f"{r['task']:10s} {r['method']:9s} steps/ex={r['mean_steps']:7.1f} " |
| f"wall={r['wall_clock_s']:6.1f}s per_forward={r['wall_clock_s']/tot*1000:6.1f}ms " |
| f"score={r['score']:.0f}") |
| print("===============================================") |
| EOF |
|
|