Skip to content

fix: print tracebacks for per-item failures in batch generation loops - #138

Open
smcshahid wants to merge 1 commit into
PKU-YuanGroup:mainfrom
smcshahid:fix/log-batch-exceptions
Open

fix: print tracebacks for per-item failures in batch generation loops#138
smcshahid wants to merge 1 commit into
PKU-YuanGroup:mainfrom
smcshahid:fix/log-batch-exceptions

Conversation

@smcshahid

Copy link
Copy Markdown

What

Adds traceback.print_exc() before each of the three per-item except Exception: continue handlers in infer_helios.py's batch modes (prompt_txt / image_prompt_csv / interactive_csv), plus the import traceback.

Why

A failing item currently leaves no trace: the process exits 0 with fewer (or zero) outputs after minutes of GPU time. Observed in practice: an interactive run OOM'd at the final postprocess after ~10 minutes and was indistinguishable from success at the process level — echo $?0, output folder empty.

Compatibility / regression

  • Keeps the author-intended skip-and-continue batch semantics; smallest possible change.
  • stderr output only; no API/behavior/exit-code change.
  • Deliberately separate from the interactive chunk-count fix (unrelated concerns); together they turn that failure from "exit 0, no files" into a visible OOM with a traceback.

🤖 Generated with Claude Code

The three batch modes (prompt_txt / image_prompt_csv / interactive_csv) wrap
each item in `except Exception: continue`. A failing item currently leaves no
trace: the process exits 0 with fewer (or zero) outputs after minutes of GPU
time. Observed in practice: an interactive run OOM'd at postprocess after
~10 minutes and was indistinguishable from success at the process level.
Keep the skip-and-continue semantics; just make the failure visible.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants