Skip to content

Let the Apply tab score with the centred vote - #111

Merged
gbradham merged 1 commit into
mainfrom
feat/offline-smoothing
Aug 6, 2026
Merged

Let the Apply tab score with the centred vote#111
gbradham merged 1 commit into
mainfrom
feat/offline-smoothing

Conversation

@gbradham

@gbradham gbradham commented Aug 6, 2026

Copy link
Copy Markdown
Member

Follow-up to #110, which added the centred smoother but left nothing able to reach it. Scoring a video through the GUI still went out via the causal path, so the recipe worth 0.780 → 0.823 macro F1 on held-out data was available only by calling the library directly.

What's wired

Apply tab → ApplyWorkerclassify()LiveInferenceConfigclassify_pose_data.

The library default stays off — an unsmoothed score is the one comparable to cross-validation, and a stored config shouldn't change meaning under its callers. The tab defaults it on at one bout (25 frames). Scoring a recording is exactly the case where reading the frames after each one is free and correct, and making people find a setting to get the better number is how the better number goes unused.

The control sits beside the existing causal one rather than replacing it. They answer different questions: the causal window is what a live overlay would have shown, and reproducing a live run is a legitimate thing to want. 0 reads as "off" so that stays reachable.

The silent-fallback hole

batch_apply declines to the streaming path for an annotated video, a CNN sequence model, or spectral features — and the stream cannot vote on frames it has not reached. So a fallback quietly turned the setting off, costing accuracy rather than just time, which is the one thing that module's docstring promises it never does ("Never silently degrades").

Every decline route now logs what it couldn't do and why, routed through a single helper so a future one can't forget:

centred offline smoothing (window 25) was requested but this run needs the
streaming path (an annotated output video was requested), which can only
smooth causally — the ethogram will be less accurate than a batch run

Tests

Every link, because none of them fails loudly when it breaks — a dropped setting just scores worse:

  • the worker forwards the value
  • omitting it leaves the pipeline default alone rather than overriding with a zero
  • the config carries it, defaulting to off
  • the tab defaults it on
  • it can be switched off, and 0 displays as "off"

2891 passed, 1 skipped; ruff and black clean.

test_delay_node_precision fails under full-suite load — pre-existing and unrelated: the identical failure reproduces on unmodified main under the same load, and it passes standalone on both.

The centred smoother existed but nothing could reach it. Scoring a video
through the GUI still went out through the causal path, so the recipe worth
0.780 -> 0.823 macro F1 on held-out data was available only to someone
calling the library directly.

Threaded from the Apply tab through ApplyWorker, classify() and
LiveInferenceConfig to classify_pose_data. The library default stays off --
an unsmoothed score is the one comparable to cross-validation, and a stored
config should not change meaning under its callers -- while the tab defaults
it on at one bout. Scoring a recording is exactly the case where reading the
frames after each one is free and correct, and making people find a setting
to get the better number is how the better number goes unused.

The control sits beside the existing causal one rather than replacing it,
because they answer different questions: the causal window is what a live
overlay would have shown, and reproducing a live run is a legitimate thing to
want. 0 reads as "off" so that is reachable.

batch_apply now says so when it declines. It falls back to the streaming path
for an annotated video, a CNN sequence model or spectral features, and the
stream cannot vote on frames it has not reached -- so a fallback silently
turned the setting off and cost accuracy rather than just time. Every
decline route now logs what it could not do and why, and the fallbacks are
routed through one helper so a future one cannot forget.

Tested at every link, because none of them fails loudly when it breaks: the
worker forwards the value, omitting it leaves the pipeline default alone
rather than overriding it with a zero, the config carries it, the tab
defaults it on, and it can be switched off.
@gbradham
gbradham merged commit c12b935 into main Aug 6, 2026
@gbradham
gbradham deleted the feat/offline-smoothing branch August 6, 2026 23:00
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