Initial commit

This commit is contained in:
2026-06-15 09:54:01 +09:00
commit ce22ba962d
21 changed files with 3465 additions and 0 deletions

17
routers/evaluate.py Normal file
View File

@@ -0,0 +1,17 @@
from fastapi import APIRouter, HTTPException
from loguru import logger
import config
from train.trainer import run_evaluate, _get_latest_model_path
router = APIRouter()
@router.post("", summary="모델 평가")
def evaluate(test_size: float = 0.2):
if not _get_latest_model_path():
raise HTTPException(
status_code=400, detail="저장된 모델 없음. 학습 먼저 실행하세요."
)
logger.info(f"평가 요청 | test_size={test_size}")
return run_evaluate(test_size)