vault backup: 2026-02-25 16:53:37
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,7 +10,7 @@ if [[ -z "$QUERY" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROMPT_FILE="$(mktemp /tmp/mem-prompt-XXXXXX.md)"
|
||||
PROMPT_FILE="$(mktemp -t mem-prompt.XXXXXX)"
|
||||
trap 'rm -f "$PROMPT_FILE"' EXIT
|
||||
|
||||
echo "[memory] 正在检索本地语义记忆..." >&2
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
import csv
|
||||
import math
|
||||
from pathlib import Path
|
||||
|
||||
csv_path = Path('memory_eval/results/cold_start_20_runs_2026-02-25.csv')
|
||||
rows = list(csv.DictReader(csv_path.open(encoding='utf-8')))
|
||||
vals = sorted(float(r['elapsed_s']) for r in rows if r.get('exit_code') == '0')
|
||||
|
||||
if not vals:
|
||||
print('no successful samples')
|
||||
raise SystemExit(0)
|
||||
|
||||
def pct(vs, q):
|
||||
i = max(0, math.ceil(len(vs) * q) - 1)
|
||||
return vs[i]
|
||||
|
||||
p50 = pct(vals, 0.50)
|
||||
p95 = pct(vals, 0.95)
|
||||
print({'success_samples': len(vals), 'p50_s': round(p50, 4), 'p95_s': round(p95, 4), 'target_le_4_5s': p95 <= 4.5})
|
||||
Reference in New Issue
Block a user