chore: 2차년도 성능평가 측정 구성 초기 업로드
data(train 520·holdout 120), server(발화 생성 서버), eval(grounding_eval), run_eval.py·run_test.sh. logs/ 는 실행 때마다 생기는 기록이라 README.md 만 올리고 나머지는 .gitignore 로 뺀다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
13ab9dee84
70 files changed
+17141
No files matched your search
Whitespace-only changes.
@@ -0,0 +1,23 @@
|
||||
"""공용 Enum 정의."""
|
||||
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class KnowledgeType(str, Enum):
|
||||
"""지식 유형 — 데이터양식 §4-C knowledge.type 과 같은 값."""
|
||||
PRODUCT_FEATURE = "product_feature"
|
||||
PRICE_INFO = "price_info"
|
||||
SCENARIO_VARIABLE = "scenario_variable"
|
||||
KTC_VARIABLE = "ktc_variable"
|
||||
CARD_FACT = "card_fact"
|
||||
NEGOTIATION_CARD = "negotiation_card"
|
||||
PRIVATE_TARGET = "private_target"
|
||||
PREVIOUS_TURN = "previous_turn"
|
||||
|
||||
|
||||
class Strategy(str, Enum):
|
||||
"""행동 전략 4종 [계획서 p.31]."""
|
||||
CONCESSION = "양보"
|
||||
ASSERTION = "주장"
|
||||
INQUIRY = "탐색"
|
||||
COMPROMISE = "타협"
|
||||
@@ -0,0 +1,28 @@
|
||||
"""로깅 설정 — KST 타임스탬프, 파일 회전 + 콘솔."""
|
||||
|
||||
import logging
|
||||
from datetime import datetime, timezone, timedelta
|
||||
from logging.handlers import RotatingFileHandler
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from common.paths import LOGS_DIR
|
||||
|
||||
|
||||
def _kst_converter(*args):
|
||||
return datetime.now(timezone(timedelta(hours=9))).timetuple()
|
||||
|
||||
|
||||
def setup_logging(level: int = logging.INFO, log_dir: Optional[Path] = None) -> None:
|
||||
log_dir = log_dir or LOGS_DIR
|
||||
log_dir.mkdir(parents=True, exist_ok=True)
|
||||
logging.Formatter.converter = _kst_converter
|
||||
logging.basicConfig(
|
||||
level=level,
|
||||
format="[%(asctime)s] [%(levelname)s] %(name)s: %(message)s",
|
||||
handlers=[
|
||||
RotatingFileHandler(log_dir / "server.log", maxBytes=10 * 1024 * 1024,
|
||||
backupCount=5, encoding="utf-8"),
|
||||
logging.StreamHandler(),
|
||||
],
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
"""서버 루트 기준 경로 정의."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
SERVER_ROOT = Path(__file__).resolve().parents[1]
|
||||
RESOURCES_DIR = SERVER_ROOT / "resources"
|
||||
DATA_DIR = SERVER_ROOT / "data"
|
||||
LOGS_DIR = SERVER_ROOT / "logs"
|
||||
|
||||
|
||||
def resolve_data_path(path_str: str) -> Path:
|
||||
"""config 의 상대경로를 서버 루트 기준 절대경로로 변환한다."""
|
||||
p = Path(path_str)
|
||||
return p if p.is_absolute() else SERVER_ROOT / p
|
||||
Reference in new issue
Block a user