fix(data-science): make _safe_pyplot_savefig CJK/race-tolerant (S-E)#11
Merged
Merged
Conversation
S-E 한국어 라벨 시나리오에서 plt.savefig(artifact_path("..."))가 cwd가
정확히 artifact_dir인데도 silently 파일을 만들지 않던 회귀 해결.
Fix:
- bbox_inches='tight' 자동 주입 — CJK 라벨이 canvas 밖으로 잘리거나
stale figure가 invalid metric을 가질 때 발생하는 zero-byte 출력 차단
- savefig 호출 후 파일이 만들어지지 않았으면 canvas.draw() 강제 후
1회 재호출 — figure manager state leak으로 인한 silent no-op 복구
E2E (dong, playwright) — S-E korean_sales.csv 한국어 라벨:
- 이전: stdout saved + exists False, generated_files []
- 이후: korean_sales_by_region.png 정상 등록 + 다운로드
pytest 316/316 PASS, 회귀 0.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 21, 2026
This was referenced May 22, 2026
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.
Summary
S-E 한국어 라벨 시나리오에서 `plt.savefig` 호출 후 파일이 silently 안 만들어지던 follow-up 회귀 fix.
Root Cause
backend container 직접 simulate에서는 정상 작동 → multi-turn dong 계정의 누적 matplotlib state가 CJK 라벨 + tight_layout 조합에서 zero-byte 또는 silent no-op 만듦.
Fix
Verification
🤖 Generated with Claude Code