ETA from wall-clock throughput instead of per-file transcribe times - #34
Merged
Conversation
…rapolates from the batch's own wall-clock throughput instead of averaging per-file transcribe times, which measured only the stage it watched and priced every remaining file as work — on a run that was 603 skips out of 624 files that read as 3000+ minutes for about 80 minutes of actual work, and iCloud downloads and extraction stalls were never counted at all because the clock only started at 'transcribing'.
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.
Reported from a live run: the bottom bar was predicting 3000+ minutes remaining.
Why it was wrong
The estimate was
mean(per-file transcribe time) × files remaining, where the per-file clock ran from thetranscribingstatus todone. Two things fell out of that:extract_q.get()— iCloud downloads, ffmpeg extraction, a starved transcriber — happens before the status flips totranscribing, so it contributed zero. The one-time whisper model load did the opposite:engine.load()sits inside the timed window, so it landed entirely on the first file and dragged the mean for the rest of the run.The reported run, measured from history and the log:
A 97%-skip batch was being quoted at roughly 40x its real cost.
The change
Wall-clock throughput accounts for everything the batch actually spends — downloads, extraction stalls, the model load amortised across the run, translation running alongside — and lets cheap files cost what they cost instead of needing a special case. It also deletes more than it adds:
_durations,_active_sinceand_track_etaare gone.Per-file measurements were considered first (drop the first sample, use a median, pre-count files that will be skipped). Wall-clock subsumes all three and needs no extra I/O over hundreds of iCloud paths at batch start.
Known limit: it assumes the rest of the batch skips at roughly the rate seen so far, so a run whose skipped files are all front-loaded will read low until it catches up — but it does catch up as the mix changes, which the old formula never did in the downward direction.
Also
downloadingwas missing from the viewmodel's active-status set, so the bottom bar showed no current file while one was being fetched from iCloud — it was added to the run page's list in #33 but not this one.Tests
201 passed / 5 skipped. Three new: throughput extrapolation, a batch of instant skips staying cheap (the reported shape), and no estimate before the first file finishes while the row still reports as busy.