⑦ 협상데이터 수집 완료(10,272건 PASS) + 저장소를 입력·코드·최종 결과만 남기게 정리
⑦ 협상데이터 수집 - collect.py 추가 — ①의 협상 실행기를 재사용해 챗봇을 돌리고 계약 기록을 data/contracts.jsonl 에 축적 (재실행 시 수집분 건너뜀, data/.collect.lock 으로 동시 실행 차단) - run.py 에 ProfiledOpponent 추가 — gpt-4o 실측 409건 분포로 보정한 규칙 기반 공급사(프로파일 4종, seed 고정) 검증: 같은 409 케이스에서 첫 제안·양보폭·합의가·협상률 일치, 카드 수락과 목표 달성은 6~7%p 보수적 - 시뮬레이터 상대로 10,272건 수집 → 목표 10,000건 PASS - aggregate.py 간소화 — result.json 은 최종 집계·목표 건수·판정 3개만. 계획서 평가방법이 기간 환산을 규정하지 않으므로 연환산 제거, 건수는 고유 session_id 수로 집계 저장소 정리 - 각 eval/<지표>/ 에 측정 코드·result.json·provenance.md 와 최종 데이터 산출물만 남김 - 실행 원본·로그·중간 산출물은 NEGO_DOCS/_archive_20260909_*/ 로 이동 (provenance 가 위치를 가리킨다) - 삭제: description.md, testdata/testset_100.json(파일럿 미사용), testdata/validate_dataset.py(미참조), ⑨ 본측정 폴더 내 중복 6개, 서버 로그 동결본 - .gitignore 에 재생성되는 중간 산출물 등록 - provenance 8종을 정의·원천·명령·결과 중심으로 재작성 (364줄 → 240줄) - 재현 검증: ⑦⑧② 집계기 재실행 시 동일 수치 자체측정 8종 전부 PASS — ① 85.67% ② 76.29% ③ 5.877% ⑥ p95 31.65ms ⑦ 10,272건 ⑧ 96.1% ⑨ 99.71% ⑩ 98.23% Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
af12ba44db
commit
87aeda52a4
66 files changed
+339859
-55777
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,9 @@
|
||||
# ⑨ 시나리오 분류 — 파생 경로
|
||||
- 원천: `data/train.csv`·`data/test.csv` (품목명 단위 8:2 분할, seed 926 — build_dataset.py, 품목명은 `testdata/product_names.json`)
|
||||
· 예측 `data/predictions.csv`, 실행 원본·로그 `본측정_azure_20260903/` (result·detail·log·meta·model.pt)
|
||||
|
||||
- 정의: 자체 구축 라벨링 데이터(품목 - 협상 시나리오) 분류의 macro-F1. 목표 96%
|
||||
- 입력: `testdata/product_names.json`(품목명) + `testdata/scenario_rule.py`(4분면 룰)
|
||||
→ 품목명 단위 8:2 홀드아웃, seed 926 (같은 품목이 train/test 에 걸치지 않는다)
|
||||
- 명령: `cd eval/09_scenario_f1 && python3 build_dataset.py && python3 train.py && python3 run.py`
|
||||
- 산출: `result.json` — macro-F1 99.71% (홀드아웃 1,032건, micro-F1 99.81%) · 건별 `detail.jsonl` (모델 `model.pt`, 문자임베딩+구조피처 MLP)
|
||||
- 모델: 품목명 문자 임베딩(32) + 구조 피처 → MLP 4클래스, CPU, seed 고정 → `model.pt`
|
||||
- 결과: `result.json` — **macro-F1 99.71%** (홀드아웃 1,032건, micro-F1 99.81%)
|
||||
- 학습 데이터·예측·실행 로그: 저장소 밖 `NEGO_DOCS/_archive_20260909_실행원본/09_scenario_f1/` (위 명령으로 재생성 가능)
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,108 +0,0 @@
|
||||
===== 2026-09-03T04:33:45Z 환경 =====
|
||||
NAME="Ubuntu"
|
||||
Python 3.10.14
|
||||
torch 2.4.1+cpu
|
||||
|
||||
===== 1) build_dataset.py --seed 926 =====
|
||||
{"품목명": 864, "train": 4152, "test": 1032, "라벨분포": {"Scenario_A": 2023, "Scenario_D": 2066, "Scenario_C": 539, "Scenario_B": 556}, "seed": 926}
|
||||
|
||||
===== 2) train.py --epochs 60 --seed 926 =====
|
||||
epoch 1 loss 1.1928 test_acc 0.7384
|
||||
epoch 2 loss 0.9171 test_acc 0.7829
|
||||
epoch 3 loss 0.4998 test_acc 0.8149
|
||||
epoch 4 loss 0.2826 test_acc 0.9205
|
||||
epoch 5 loss 0.1831 test_acc 0.9748
|
||||
epoch 6 loss 0.1257 test_acc 0.9922
|
||||
epoch 7 loss 0.0908 test_acc 0.9952
|
||||
epoch 8 loss 0.0715 test_acc 0.9961
|
||||
epoch 9 loss 0.0551 test_acc 0.9971
|
||||
epoch 10 loss 0.0461 test_acc 0.9942
|
||||
epoch 11 loss 0.0376 test_acc 0.9990
|
||||
epoch 12 loss 0.0312 test_acc 0.9981
|
||||
epoch 13 loss 0.0269 test_acc 0.9971
|
||||
epoch 14 loss 0.0222 test_acc 0.9981
|
||||
epoch 15 loss 0.0193 test_acc 0.9990
|
||||
epoch 16 loss 0.0180 test_acc 0.9981
|
||||
epoch 17 loss 0.0145 test_acc 0.9971
|
||||
epoch 18 loss 0.0125 test_acc 0.9981
|
||||
epoch 19 loss 0.0111 test_acc 0.9971
|
||||
epoch 20 loss 0.0104 test_acc 0.9971
|
||||
epoch 21 loss 0.0090 test_acc 0.9961
|
||||
epoch 22 loss 0.0077 test_acc 0.9971
|
||||
epoch 23 loss 0.0068 test_acc 0.9971
|
||||
epoch 24 loss 0.0061 test_acc 0.9981
|
||||
epoch 25 loss 0.0063 test_acc 0.9971
|
||||
epoch 26 loss 0.0051 test_acc 0.9971
|
||||
epoch 27 loss 0.0044 test_acc 0.9990
|
||||
epoch 28 loss 0.0040 test_acc 0.9981
|
||||
epoch 29 loss 0.0036 test_acc 0.9971
|
||||
epoch 30 loss 0.0036 test_acc 0.9971
|
||||
epoch 31 loss 0.0031 test_acc 0.9981
|
||||
epoch 32 loss 0.0028 test_acc 0.9990
|
||||
epoch 33 loss 0.0028 test_acc 0.9981
|
||||
epoch 34 loss 0.0024 test_acc 0.9981
|
||||
epoch 35 loss 0.0022 test_acc 0.9971
|
||||
epoch 36 loss 0.0021 test_acc 0.9990
|
||||
epoch 37 loss 0.0019 test_acc 0.9971
|
||||
epoch 38 loss 0.0018 test_acc 0.9971
|
||||
epoch 39 loss 0.0017 test_acc 0.9971
|
||||
epoch 40 loss 0.0016 test_acc 0.9971
|
||||
epoch 41 loss 0.0015 test_acc 0.9971
|
||||
epoch 42 loss 0.0014 test_acc 0.9990
|
||||
epoch 43 loss 0.0013 test_acc 0.9971
|
||||
epoch 44 loss 0.0012 test_acc 0.9971
|
||||
epoch 45 loss 0.0012 test_acc 0.9971
|
||||
epoch 46 loss 0.0011 test_acc 0.9981
|
||||
epoch 47 loss 0.0010 test_acc 0.9981
|
||||
epoch 48 loss 0.0010 test_acc 0.9971
|
||||
epoch 49 loss 0.0009 test_acc 0.9971
|
||||
epoch 50 loss 0.0009 test_acc 0.9971
|
||||
epoch 51 loss 0.0008 test_acc 0.9990
|
||||
epoch 52 loss 0.0008 test_acc 0.9981
|
||||
epoch 53 loss 0.0007 test_acc 0.9990
|
||||
epoch 54 loss 0.0007 test_acc 0.9981
|
||||
epoch 55 loss 0.0007 test_acc 0.9981
|
||||
epoch 56 loss 0.0006 test_acc 0.9971
|
||||
epoch 57 loss 0.0006 test_acc 0.9981
|
||||
epoch 58 loss 0.0006 test_acc 0.9981
|
||||
epoch 59 loss 0.0006 test_acc 0.9981
|
||||
epoch 60 loss 0.0005 test_acc 0.9981
|
||||
{"train": 4152, "test": 1032, "vocab": 680, "torch": "2.4.1+cpu", "출력": "data/predictions.csv, model.pt"}
|
||||
|
||||
===== 3) run.py (macro-F1, 목표 96) =====
|
||||
{
|
||||
"n": 1032,
|
||||
"산식": "macro-F1 (클래스별 F1 단순 평균) — 불균형 대비 보수적 채점",
|
||||
"macro_f1_pct": 99.71,
|
||||
"micro_f1_pct(accuracy)": 99.81,
|
||||
"클래스별": {
|
||||
"Scenario_A": {
|
||||
"precision": 0.9975,
|
||||
"recall": 1.0,
|
||||
"f1": 0.9988,
|
||||
"support": 403
|
||||
},
|
||||
"Scenario_B": {
|
||||
"precision": 1.0,
|
||||
"recall": 0.9915,
|
||||
"f1": 0.9957,
|
||||
"support": 118
|
||||
},
|
||||
"Scenario_C": {
|
||||
"precision": 1.0,
|
||||
"recall": 0.9904,
|
||||
"f1": 0.9952,
|
||||
"support": 104
|
||||
},
|
||||
"Scenario_D": {
|
||||
"precision": 0.9975,
|
||||
"recall": 1.0,
|
||||
"f1": 0.9988,
|
||||
"support": 407
|
||||
}
|
||||
},
|
||||
"target_pct": 96.0,
|
||||
"verdict": "PASS"
|
||||
}
|
||||
|
||||
===== 2026-09-03T04:33:58Z 완료 =====
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"지표": "⑦ 품목별 협상 시나리오 분류 (macro-F1)",
|
||||
"실행환경": "Azure VM vm-nego-daegu (Standard_B2ms, Korea South) / nego-backend 컨테이너: Ubuntu 20.04.6, Python 3.10.14, torch 2.4.1+cpu, CPU 학습",
|
||||
"명령": ["python3.10 build_dataset.py --seed 926", "python3.10 train.py --epochs 60 --seed 926", "python3.10 run.py --target 96"],
|
||||
"데이터": {"품목명": 864, "표본/품목": 6, "train": 4152, "test": 1032, "분할": "품목명 단위 8:2 홀드아웃", "라벨": "testdata/scenario_rule.py 4분면 룰"},
|
||||
"시작": "2026-09-03T04:33:45Z", "종료": "2026-09-03T04:33:58Z",
|
||||
"결과": {"macro_f1_pct": 99.71, "micro_f1_pct": 99.81, "target_pct": 96.0, "verdict": "PASS"}
|
||||
}
|
||||
Binary file not shown.
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"n": 1032,
|
||||
"산식": "macro-F1 (클래스별 F1 단순 평균) — 불균형 대비 보수적 채점",
|
||||
"macro_f1_pct": 99.71,
|
||||
"micro_f1_pct(accuracy)": 99.81,
|
||||
"클래스별": {
|
||||
"Scenario_A": {
|
||||
"precision": 0.9975,
|
||||
"recall": 1.0,
|
||||
"f1": 0.9988,
|
||||
"support": 403
|
||||
},
|
||||
"Scenario_B": {
|
||||
"precision": 1.0,
|
||||
"recall": 0.9915,
|
||||
"f1": 0.9957,
|
||||
"support": 118
|
||||
},
|
||||
"Scenario_C": {
|
||||
"precision": 1.0,
|
||||
"recall": 0.9904,
|
||||
"f1": 0.9952,
|
||||
"support": 104
|
||||
},
|
||||
"Scenario_D": {
|
||||
"precision": 0.9975,
|
||||
"recall": 1.0,
|
||||
"f1": 0.9988,
|
||||
"support": 407
|
||||
}
|
||||
},
|
||||
"target_pct": 96.0,
|
||||
"verdict": "PASS"
|
||||
}
|
||||
Reference in new issue
Block a user