feat(workflow): per-step and per-tile log files - #30
Merged
Conversation
Add a shared logs/steps.log for the sequential CPU steps (convert/prepare/merge) and a logs/segment/<index>.log per GPU tile. A line-buffered tee in _pw.start_log mirrors stdout/stderr and library logging into the file, so a Python traceback (or output up to an OOM/ walltime kill) is preserved even when the SLURM job log is empty — which is exactly the blind spot we hit debugging segment failures. Also revert the segment mem_mb bump: sacct showed MaxRSS ~1 GB, so the failure was a Python error (exit 1), not OOM. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
SLURM job logs came back empty on failures (
message: None), making segment crashes undebuggable. Add file logging in the work dir:logs/steps.log— shared by the sequential CPU steps (convert / prepare / merge)logs/segment/<index>.log— one per GPU tile_pw.start_log()tees stdout, stderr and library logging into the file, line-buffered, so a traceback (or all output up to an OOM/walltime SIGKILL) survives even when the SLURM.logis empty.Each rule now declares
log:; each script callsstart_log(snakemake.log[0]).Also reverts the earlier
segment: mem_mbbump —sacctshowedMaxRSS ≈ 1 GB, so the real failure is a Python error (ExitCode 1:0), not OOM.Test
Local run 12/12;
logs/steps.logholds the merge logs,logs/segment/3.logholds that tile's output.🤖 Generated with Claude Code