Skip to content

Commit fc5d18e

Browse files
pko89403claude
andcommitted
Record path A end-to-end smoke success and loader bug finding
Fetched real BEIR/SciFact data (56 samples: 14 qrels positives + 42 lexical hard negatives), generated judgments via LM Studio, extracted bert features, trained LightGBM + sigmoid calibration, and produced a real scorer.joblib that scores held-out test features. Two findings recorded in Q004: 1. load_lightgbm_scorer misroutes: when metadata_path is passed it assumes a raw Booster file, but the training pipeline exports a joblib dict. The spec's documented from_artifact(path, metadata_path=) call fails on the pipeline's own artifact; from_artifact(path) works. Same root cause as YAGNI finding #1 (4 loader formats, 1 produced). 2. macOS ARM: torch + lightgbm in one process deadlock/segfault via dual OpenMP; artifact was produced by splitting extraction and training into separate processes. Not a ranksmith code bug. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 4e6a1e8 commit fc5d18e

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

docs/wiki/05_open_questions.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,14 @@ Needed From User (경로 A 확정에 따른 잔여 결정):
6868
4. scorer artifact 학습에 쓸 실제 데이터셋 소스 (아래 스모크 실행에서 확인된 ≥30 샘플 요건).
6969

7070
Smoke 실행에서 확인된 사실 (2026-07-05, LM Studio qwen3.5-9b + libomp 설치 후):
71-
- generation 파이프라인: `generate_judgment_confidence_dataset`가 LM Studio provider로 엔드투엔드 동작 (fixture 15개 → 15개 생성).
72-
- 추론 절반: `FrozenAutoEncoder`(bert-base-uncased) 로드 + `extract_structural_features`가 실제 데이터에서 문서화된 70차원 `structural-v1` 특징 생성 확인.
73-
- 학습 파이프라인: `split.py``MIN_TOTAL_SAMPLES = 30`을 강제. 리포의 `reranking_smoke_fixture.jsonl`은 3 query × 5 doc = 15개뿐이라 artifact 생성 불가. **≥30개 실제 라벨 데이터 확보가 artifact 생성의 선행 조건.**
71+
- **경로 A 전체 관통 성공** — BEIR/SciFact 실데이터 56개(qrels positive 14 + 어휘 유사 hard negative 42) → LM Studio judgment 생성(정답 일치 44 / 불일치 12) → bert 특징 추출 → LightGBM 학습 + sigmoid 보정 → **실제 scorer artifact(scorer.joblib) 생성** → held-out test 특징에 confidence 점수 산출 확인.
72+
- generation 파이프라인: `generate_judgment_confidence_dataset`가 LM Studio provider로 엔드투엔드 동작.
73+
- 추론 절반: `FrozenAutoEncoder`(bert-base-uncased) 로드 + 70차원 `structural-v1` 특징 생성 확인.
74+
75+
발견한 문제 (구현 착수 전 처리 필요):
76+
1. **로더 버그 (`load_lightgbm_scorer`)**: 학습 파이프라인은 `joblib.dump({"metadata":..., "scorer":...})` 형식으로 저장하는데, 로더는 **metadata_path가 주어지면** 아티팩트를 원시 LightGBM Booster 텍스트 파일로 간주(`_load_lightgbm_booster_scorer`)해 로드 실패("Unknown model format"). 그런데 `spec_confidence_runtime_readiness.md` §3의 `from_artifact``load_lightgbm_scorer(path, metadata_path=metadata_path)`로 문서화돼 있고 `export_scorer_artifact`는 sidecar `write_metadata_json`까지 제공 → 스펙대로 만든 아티팩트를 스펙대로 로드하면 깨진다. 올바른 호출은 `from_artifact(path)`(metadata는 joblib 내장) — 확인함. YAGNI 리뷰 finding #1(로더가 4개 포맷 지원, 학습은 1개만 생산)과 동일 원인. 수정: 로더가 metadata_path 유무가 아니라 **아티팩트 내용**으로 포맷을 판별하도록 하거나, 미사용 booster 포맷을 제거.
77+
2. **macOS ARM 환경 제약 (ranksmith 코드 문제 아님)**: torch(인코더)와 lightgbm을 **한 프로세스**에서 같이 쓰면 이중 OpenMP 충돌로 segfault/hang. `score_batch`(인코더+scorer 동시)가 이 박스에서 완료되지 않음. 우회: 특징 추출(torch)과 학습/예측(lightgbm)을 별도 프로세스로 분리 — 이 방식으로 artifact를 생성함. scoring 로직 자체는 lightgbm 단독 프로세스에서 정상 동작 확인.
78+
3. ~~≥30 샘플 요건~~ — SciFact 실데이터 56개로 해소.
7479

7580
## Q001 <topic>
7681
Status: blocked | needs-user-decision | resolved

0 commit comments

Comments
 (0)