Skip to content

Say what the baseline comparison needs before spending anything on it - #2

Merged
Jacob-9909 merged 1 commit into
mainfrom
fix/harness-preflight
Sep 9, 2026
Merged

Say what the baseline comparison needs before spending anything on it#2
Jacob-9909 merged 1 commit into
mainfrom
fix/harness-preflight

Conversation

@Jacob-9909

Copy link
Copy Markdown
Owner

run_baseline_comparison.py 를 실제로 돌려 보려다 나온 것들이다.

골드셋 경로가 코드에 박혀 있었다

20251104_NL2SQL_메뉴별컨텐츠정리.xlsx 는 고객사 데이터라 저장소에 없다. 그런데 이름이 코드에 있어서, 처음 돌리는 사람은 openpyxl 의 FileNotFoundError 를 본다 — 파일이 원래 없는 것인지, 자기가 뭘 잘못한 것인지 알 수 없다. 인자로 받게 하고, 상수 docstring 에 "저장소에 없다" 를 적었다.

전제조건을 한 번에 말한다

preflight 가 셋을 모아서 보고한다 — 골드셋 파일, 라이브 MSSQL, LLM 공급자.

하나씩 터뜨리면 고치고 다시 돌리기를 세 번 해야 한다. 더 중요한 건 비용이다. 이 스크립트는 50문항 × 2팔 × 최대 3회로 모델을 수백 번 부른다. 절반쯤 가서 멈추면 돈은 쓰고 비교는 못 얻는다 — 한 팔만 끝난 숫자는 대조가 아니다.

없는 환경에서 실제로 확인한 출력:

실행 전제조건이 갖춰지지 않았다:

  1. 골드셋 파일이 없다: 20251104_NL2SQL_메뉴별컨텐츠정리.xlsx
     저장소에 들어 있지 않다(고객사 데이터). 경로를 인자로 넘겨라:
     uv run python scripts/run_baseline_comparison.py <경로.xlsx>
  2. 라이브 MSSQL 에 붙지 못했다.
     .env 의 TABLEFOLD_MSSQL_HOST / PORT / USER / PASSWORD / DB 를 채워라.
  3. LLM 공급자를 쓸 수 없다: ANTHROPIC_API_KEY 가 설정되어 있지 않다; OPENAI_API_KEY 가 설정되어 있지 않다

종료 코드 1. 조건이 하나씩 갖춰지면 목록도 그만큼 줄어드는 것까지 확인했다.

손대지 않은 것

run_goldset_value_match_test.py 도 첫 문제 하나만, traceback 으로 보고한다. 다만 LiveUnavailable 이라는 도메인 오류에 문장이 붙어 있고 종료 코드도 1 이라 못 읽을 정도는 아니다. preflight 를 그쪽에서 쓰려면 두 스크립트가 서로를 임포트하게 되므로(이미 이쪽이 저쪽을 임포트한다) 두었다.

demo/scripts/ 의 ruff 오류 157 건도 그대로다. F821 4 건은 전부 Any 어노테이션인데 두 파일 다 from __future__ import annotations 를 갖고 있어 런타임 문제가 아니고, 나머지 138 건은 줄 길이다. 한 번도 lint 된 적 없는 디렉터리를 대량 리포맷하면 diff 만 커지고 얻는 게 없다.

검증

410 passed, ruff src tests 통과.

The goldset workbook is client data and is not in the repo, but its name
was written into the script, so a first run ended in openpyxl's
FileNotFoundError rather than in a sentence. The path is an argument now.

preflight gathers all three prerequisites — workbook, live MSSQL, an LLM
provider — and reports them together. One at a time means fix, rerun, fix,
rerun; worse, this script makes hundreds of model calls, so failing at the
halfway point spends the money and still leaves one arm unfinished, which
is not a comparison.
@Jacob-9909
Jacob-9909 merged commit bb41b5b into main Sep 9, 2026
3 checks passed
@Jacob-9909
Jacob-9909 deleted the fix/harness-preflight branch September 9, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant