Feat/chunked preprocessing - #2
Merged
Merged
Conversation
…abel; README rewritten to match code; ignore __pycache__ - explicit spawn context for chunk workers (no fork-from-threads warnings) - per-video 'video facts' line (dims, fps, frames, duration); throughput logged as 'frames/s processed' (distinct from the video's fps) - README documents run-vs-CLI defaults, none=bypass, chunking design, and the loud-failure guards - __pycache__/.pytest_cache untracked and gitignored
Hilda-Azimi
requested review from
sharmishtaa
and
a lite review from Copilot
and removed request for
Copilot
September 21, 2026 18:52
sharmishtaa
reviewed
Sep 21, 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.
What this is
Implements option 2 from the preprocessing-scale discussion: chunked
parallel processing, built in now so future methods inherit it.
With
--workers N(Reproducible-Run default: 8) the video is split intoN contiguous frame ranges; each worker (own process, explicit spawn
context) decodes its range, applies the transform, and encodes its own
lossless part; parts are joined by ffmpeg stream copy (no
re-encode).
--workers 1is the original sequential path, unchanged.Why the output is trustworthy
boundaries cannot leave fingerprints — and
test_chunked_parity.pyproves it: chunked vs sequential decoded frame-by-frame, max abs
pixel diff asserted == 0, on a video whose frame count doesn't
divide evenly by the worker count.
(fps/width/height/frame-count), a chunk seek that doesn't land exactly
on its start frame, short reads, and any joined-output frame-count
mismatch. No silent guessing (the old fps→60 fallback is gone).
Also in this PR
clahe, glob**/*[eE]ye*.mp4, training-recipe parameters);noneis a fast bypass (manifest only, no 164 GB copying) — pipeline
wiring should route
nonesessions to the original asset (noted forthe integration design).
runmaps App Panel positionals → CLI flags with safe defaults(panel field order documented in the script).
explanations from the skeleton-PR review);
__pycache__gitignored.preprocessing.jsonnow records workers + per-chunk frame counts.Validation
warnings.
wall-clock (~26 frames/s/worker), all chunks uniform, frame counts
verified.
Known follow-up (deliberately deferred)
Chunking assumes per-frame transforms — true of both current methods. A
future method with temporal dependencies should declare itself
sequential via a registry flag (1-line extension when such a method
exists).