③⑩ 단독측정 정본 반영 + 테스트데이터 지표별 명명 + ⑩ 실행기 경로 정리

③⑩ 을 09-10 단독측정으로 교체 (지표별 독립 실행기 negotiation.py, gpt-4o 1종 300건)
  ③ 5.877 → 5.784% · ⑩ 98.23 → 98.36% (253세션 1,086매칭)
  ①의 협상 기록 재집계 방식은 aggregate.py 보조 경로로 유지

run-eval.sh ⑩ 경로를 ③ 과 같은 단독측정으로 교체 (M10_REAGG=1 이면 옛 재집계)
eval/10_persona/aggregate.py
  - --out 추가 — 시험 실행이 정본 result.json·detail.jsonl 을 덮지 않게
  - 세션 대응 키를 기록의 session_id 우선으로 (EVAL-case_id 하드코딩 시
    EVAL10-* 기록이 ①의 옛 로그와 잘못 짝지어져 오답을 냈다. ① 기록은 폴백 동작 동일)

testdata 명명 규칙 <지표번호>_data_<이름>, 둘 이상이 쓰면 00_ (공용)
  testset_300 → 00_data_testset_300 · product_names → 00_data_product_names
  2_total_data → 02_data_total · 7_testset_10272 → 07_data_testset_10272
  8_items1000_master → 08_data_items1000_master
  생성기·룰(.py)은 번호 없음. 끝난 측정의 기록에는 옛 이름이 남아 있어
  testdata/README.md 에 옛↔새 대응표를 둔다

eval/SUMMARY.md 를 정본 수치와 일치시킴
③ 100건 파일럿 실행원본은 저장소 밖 _archive_20260910_실행원본/ 으로 이동

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
민헌andClaude Opus 5 committed 2026-09-11 11:12:32 +09:00
1 parent cb839e22f9
commit 50016ebd06
41 files changed
+4008 -100

No files matched your search

+19 -7
View File
@@ -14,7 +14,9 @@
사용:
python aggregate.py --details "<① 실행 원본>/detail_*.jsonl" (원본은 저장소 밖 NEGO_DOCS/_archive_20260909_실행원본/01_win_rate/ 에 보관)
출력: data/persona_meta.json 산식·정의·표본 추림·페르소나 분포
python aggregate.py --details "<...>" --out /tmp/x 정본을 건드리지 않고 그 폴더에 산출
출력: (기본 이 스크립트 폴더 — --out 으로 옮길 수 있다)
data/persona_meta.json 산식·정의·표본 추림·페르소나 분포
detail.jsonl 라운드별 예측·실제·오차
result.json 세션 수 + 정확도 + PASS/FAIL
"""
@@ -70,6 +72,8 @@ def main():
ap.add_argument("--details", required=True,
help="하네스 detail 파일 glob (예: '../01_win_rate/본측정_*/detail_*.jsonl')")
ap.add_argument("--target", type=float, default=96.0)
ap.add_argument("--out", type=Path, default=HERE,
help="산출 위치 (기본: 이 스크립트 폴더 = 정본). 시험 실행은 다른 경로를 준다")
args = ap.parse_args()
pred = load_predicted(args.tension_log)
@@ -89,7 +93,10 @@ def main():
if entries is None:
undefined_sessions += 1
continue
session = f"EVAL-{row['case_id']}"
# 기록에 session_id 가 있으면 그것을 쓴다 — 단독측정 기록은 접두가 EVAL10 이라
# EVAL-n 으로 가정하면 ①의 옛 로그와 엉뚱하게 짝지어진다.
# ①의 본측정 기록에는 session_id 필드가 없어 옛 규칙(EVAL-case_id)으로 되돌아간다.
session = row.get("session_id") or f"EVAL-{row['case_id']}"
for k, actual in entries:
p = pred.get((session, k))
if p is None:
@@ -109,7 +116,8 @@ def main():
accuracy_pct = round(100 * (1 - overall), 2) if overall is not None else None
verdict = "PASS" if accuracy_pct is not None and accuracy_pct >= args.target else "FAIL"
meta_dir = HERE / "data"
args.out.mkdir(parents=True, exist_ok=True)
meta_dir = args.out / "data"
meta_dir.mkdir(exist_ok=True)
(meta_dir / "persona_meta.json").write_text(json.dumps({
"산식": "1 − mean(시나리오별 mean(|실제 − 예측|)) — 계획서 원문 산식 (시나리오=세션)",
@@ -125,17 +133,21 @@ def main():
}, ensure_ascii=False, indent=1), encoding="utf-8")
out = {
"세션 수": len(session_means),
"집계 세션": len(session_means),
"제외_정의불가_세션": undefined_sessions,
"제외사유": "초기 제안가 ≤ 목표가 — 긴장도 분모(초기 제안가 − 목표가)가 0 이하라 정의 불가",
"매칭 라운드": matched,
"미매칭 라운드": missing,
"평균오차": round(overall, 4) if overall is not None else None,
"페르소나_적용분포": dict(persona_counter),
"페르소나정확도_pct": accuracy_pct,
"목표_pct": args.target,
"verdict": verdict,
"상세": "data/persona_meta.json",
}
(HERE / "result.json").write_text(json.dumps(out, ensure_ascii=False, indent=1),
encoding="utf-8")
with open(HERE / "detail.jsonl", "w", encoding="utf-8") as f:
(args.out / "result.json").write_text(json.dumps(out, ensure_ascii=False, indent=1),
encoding="utf-8")
with open(args.out / "detail.jsonl", "w", encoding="utf-8") as f:
for r in detail_out:
f.write(json.dumps(r, ensure_ascii=False) + "\n")
print(json.dumps(out, ensure_ascii=False, indent=1))