Skip to content

ETA from wall-clock throughput instead of per-file transcribe times - #34

Merged
TN019 merged 1 commit into
mainfrom
eta-wall-clock
Aug 7, 2026
Merged

ETA from wall-clock throughput instead of per-file transcribe times#34
TN019 merged 1 commit into
mainfrom
eta-wall-clock

Conversation

@TN019

@TN019 TN019 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

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 the transcribing status to done. Two things fell out of that:

  • Every remaining file was priced as a full transcription. A file that already has subtitles is skipped in milliseconds, and nothing in the estimate knew that.
  • Nothing outside transcription was counted. The wait in extract_q.get() — iCloud downloads, ffmpeg extraction, a starved transcriber — happens before the status flips to transcribing, 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:

finished 624 files in 128 min (20 transcribed, 603 skipped = 97%)
real throughput: 12.3 s/file

files left      old ETA      new ETA
       100       830 min        20 min
       200      1660 min        41 min
       400      3320 min        82 min

A 97%-skip batch was being quoted at roughly 40x its real cost.

The change

ETA = elapsed / files finished × files remaining

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_since and _track_eta are 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

downloading was 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.

…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'.
@TN019
TN019 merged commit ca0ec68 into main Aug 7, 2026
1 check passed
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.

1 participant