mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
feat(benchmarks): add noise injection experiment support to CAM retrieval benchmark
- Remove hard assertion blocking WRITE_NOISE_EN=1 in retrieval benchmark tests - Add conditional exact_match assertion: enforces 100% when noise=off, skips when noise=on - New script run_retrieval_noise_sweep.py: sweeps noise 0–100% (step 10%) and produces markdown summary - Add just recipes: cam-benchmark-retrieval-sweep, cam-benchmark-sweep-cifar10, cam-benchmark-sweep-cifar100 - Add rsync-based remote sync commands for outputs and docs
This commit is contained in:
27
.justfile
27
.justfile
@@ -97,3 +97,30 @@ cam-test-retrieval-artifact DATASET_PATH NUM_ROWS="4096":
|
||||
# Run CAM retrieval benchmark on a prepared artifact with write noise enabled (Phase 2: read noise removed)
|
||||
cam-test-retrieval-artifact-write-noise DATASET_PATH NUM_ROWS="4096":
|
||||
just remote "make -C hw/sim clean && make -C hw/sim test-benchmark-retrieval TOPK_K=5 NUM_ROWS={{NUM_ROWS}} WRITE_NOISE_EN=1 WRITE_NOISE_RATE_NUM=1 WRITE_NOISE_RATE_DEN=100 CAM_RETRIEVAL_DATASET={{ DATASET_PATH }}"
|
||||
|
||||
# ── CAM retrieval benchmark noise sweep ────────────────────────────────────────
|
||||
|
||||
# Run noise sweep on a prepared dataset (0%–100%, step 10%)
|
||||
# Usage: just cam-benchmark-retrieval-sweep DATASET=outputs/.../cifar10_hash512_rows512_queries128.npz NUM_ROWS=512
|
||||
cam-benchmark-retrieval-sweep DATASET NUM_ROWS="512":
|
||||
just remote "python scripts/run_retrieval_noise_sweep.py --dataset {{DATASET}} --num-rows {{NUM_ROWS}} --output docs/cam_retrieval_noise_sweep.md"
|
||||
|
||||
# Prepare CIFAR10 dataset + run full noise sweep (all-in-one)
|
||||
cam-benchmark-sweep-cifar10 ROWS="512" QUERIES="128":
|
||||
just cam-prepare-retrieval-cifar10 {{ROWS}} {{QUERIES}}
|
||||
just remote "python scripts/run_retrieval_noise_sweep.py --dataset outputs/cam_retrieval_benchmark/datasets/cifar10_hash512_rows{{ROWS}}_queries{{QUERIES}}.npz --num-rows {{ROWS}} --output docs/cam_retrieval_noise_sweep_cifar10.md"
|
||||
|
||||
# Prepare CIFAR100 dataset + run full noise sweep (all-in-one)
|
||||
cam-benchmark-sweep-cifar100 ROWS="512" QUERIES="128":
|
||||
just cam-prepare-retrieval-cifar100 {{ROWS}} {{QUERIES}}
|
||||
just remote "python scripts/run_retrieval_noise_sweep.py --dataset outputs/cam_retrieval_benchmark/datasets/cifar100_hash512_rows{{ROWS}}_queries{{QUERIES}}.npz --num-rows {{ROWS}} --output docs/cam_retrieval_noise_sweep_cifar100.md"
|
||||
|
||||
# ── Remote ↔ local sync ────────────────────────────────────────────────────────
|
||||
|
||||
# Download benchmark outputs from remote
|
||||
download-outputs:
|
||||
rsync {{ rsync_flags }} {{ remote_root }}/outputs/cam_retrieval_benchmark/ outputs/cam_retrieval_benchmark/
|
||||
|
||||
# Download docs from remote
|
||||
download-docs:
|
||||
rsync {{ rsync_flags }} {{ remote_root }}/docs/ docs/
|
||||
|
||||
Reference in New Issue
Block a user