fix(eval): judge 호출 무한 대기 방지 (SDK 재시도 OFF + connect/read 타임아웃)#67
Merged
Merged
Conversation
측정이 첫 문항 judge 호출에서 멈춰(httpx 응답 본문 read 행) KeyboardInterrupt 로 죽는 문제. 기존에도 timeout=60 + tenacity 재시도는 있었으나, OpenAI SDK 자체 재시도(기본 max_retries=2)가 tenacity 재시도(3회)와 곱해져 최대 6회×60s ≈ 6분간 멈춘 것처럼 보였음. connect 타임아웃도 따로 없어 연결 stall도 60s 대기. - _make_judge_client: timeout=httpx.Timeout(60, connect=10), max_retries=0 로 클라이언트 생성하는 헬퍼 추가. 모듈 기본 client / _active_judge_client / configure_judge_llm 모두 이 헬퍼 경유. - max_retries=0 → 타임아웃이 곧바로 tenacity 로 전파, 3회만 재시도(2~8s 백오프). - _call_api 의 per-call timeout 도 httpx.Timeout(connect 10/read 60)로 명시.
TaskerJang
added a commit
that referenced
this pull request
May 30, 2026
…d on feat/p1) feat/chunk-rerank 가 dev 베이스라 eval 인프라(#66/#67/gpt-5.2 토글)가 없던 문제 → feat/p1-extractor-hardening 위로 rebase. 변경 내용은 동일: - Cypher: MENTIONS 청크를 12개까지 원문으로 retrieve ([..3]/substring 제거) - _rank_chunks_by_question: bge-m3 cosine 으로 entity 당 top 3 채택 + 600자 절단 - payload 모양({chunk_id,text,page}) 유지 → 답변 프롬프트 무변경 근거: Sentence-Transformers Retrieve & Re-Rank, MS GraphRAG Local Search. 한계: 답 청크가 해당 entity 의 MENTIONS 집합 안에 있을 때만 동작.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
#61 80 QA 재측정이 1번 문항(hanwha_001) judge 호출에서 멈춰 Ctrl+C(KeyboardInterrupt)로 죽음. 트레이스백:
기존에도
timeout=60+ tenacity 재시도(3회)는 있었으나:max_retries=2)가 tenacity(3회)와 곱해짐 → 최악 6회 × 60s ≈ 6분간 멈춘 것처럼 보임.변경
_make_judge_client(api_key, base_url)헬퍼 추가 — 모든 judge 클라이언트를 동일 정책으로 생성:timeout=httpx.Timeout(60.0, connect=10.0)— connect 10s / read·write·pool 60s.max_retries=0— SDK 자체 재시도 OFF, tenacity 가 유일한 재시도 주체.client/_active_judge_client/configure_judge_llm전부 이 헬퍼 경유._call_api의 per-calltimeout도_JUDGE_TIMEOUT로 명시(connect 10/read 60 유지).효과
비고
eval/metrics/answer_correctness.py와 답변 생성 클라이언트(agent/llm_client)도 동일 보강이 필요할 수 있음 — 후속에서 검토.