fix: resolve circular import with lazy import for _build_reference_snapshot
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,6 @@ from ocr_pipeline_session_store import (
|
||||
get_session_image,
|
||||
update_session_db,
|
||||
)
|
||||
from ocr_pipeline_regression import _build_reference_snapshot
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -2816,6 +2815,9 @@ async def build_grid(session_id: str):
|
||||
raise HTTPException(status_code=400, detail=str(e))
|
||||
|
||||
# Save automatic grid snapshot for later comparison with manual corrections
|
||||
# Lazy import to avoid circular dependency with ocr_pipeline_regression
|
||||
from ocr_pipeline_regression import _build_reference_snapshot
|
||||
|
||||
wr = session.get("word_result") or {}
|
||||
engine = wr.get("ocr_engine", "")
|
||||
if engine in ("kombi", "rapid_kombi"):
|
||||
|
||||
Reference in New Issue
Block a user