fix(embeddings): datetime.UTC 사용 → timezone.utc 폴리필 (Python 3.10 호환)
Browse files백엔드 Space 컨테이너는 Python 3.10 인데 embeddings/index.py 가
`from datetime import UTC` 를 사용해 ImportError → dense retrieval silent fail.
결과적으로 BM25 만 동작해 분야별 안내서 학원 편 청크가 잡히지 않고
약국 편이 잘못 매칭되는 증상. timezone.utc 로 폴리필하여 3.10·3.11+ 양쪽 호환.
src/kpaa/embeddings/index.py
CHANGED
|
@@ -13,7 +13,9 @@ from __future__ import annotations
|
|
| 13 |
import logging
|
| 14 |
import sqlite3
|
| 15 |
from collections.abc import Iterator
|
| 16 |
-
from datetime import
|
|
|
|
|
|
|
| 17 |
from pathlib import Path
|
| 18 |
from typing import Literal, NamedTuple
|
| 19 |
|
|
|
|
| 13 |
import logging
|
| 14 |
import sqlite3
|
| 15 |
from collections.abc import Iterator
|
| 16 |
+
from datetime import datetime, timezone
|
| 17 |
+
|
| 18 |
+
UTC = timezone.utc # Python 3.10 호환 (datetime.UTC 는 3.11+; 백엔드 Space=3.10)
|
| 19 |
from pathlib import Path
|
| 20 |
from typing import Literal, NamedTuple
|
| 21 |
|