Repository navigation
feat(ai): add a resumable stage runner and a mini retrain that exercises the retrain tooling in CI - #2198
Merged
Conversation
42 tasks
lusoris
force-pushed
the
test/ai-mini-retrain
branch
2 times, most recently
from
October 7, 2026 10:29
7677323 to
04da091
Compare
…PR merge (#2406) * chore(release): restore 1.0.0-rc.3 after the unintended rc.4 release PR merge The local merge train squash-merged release-please's PR #2397 (4daa287, "chore(master): release 1.0.0-rc.4") although no rc.4 cut was decided: its skip list named release PRs by number, and release-please opened the next one under a new number. This reverts 4daa287, so the eleven version files read 1.0.0-rc.3 again. The autorelease: pending label was removed from #2397 and the queued release-please run cancelled before it ran: no v1.0.0-rc.4 release or tag exists. The train now skips every release-please--* branch; a release PR lands only through the cut procedure. State: T-RELEASE-PR-LANDED-WITHOUT-CUT-2026-10-07 (opened and closed).
…ses the retrain tooling in CI (#2198) * feat(ai): add a resumable stage runner and a mini retrain that exercises the retrain tooling in CI The one-shot retrain must not be the first end-to-end run of its tools. `aiutils.pipeline` runs a list of stages with named early failures, resume from per-stage manifests and recorded seeds, library versions, lock digest and container identity. `ai/scripts/mini_retrain.py` runs the real scripts on a generated 144-row corpus: extraction, feature checks, combination, vmaf_tiny_v2..v4 and fr_regressor_v1 training and export, validation, registry validation and a PLCC / SROCC / RMSE gate that fails on NaN. The first run found that the `motion` column of every extracted table was NaN (libvmaf emits no `integer_motion` key); `_lookup` now reads the SAD score. `extract_full_features.py` gains `--assume-dims`. * test(ai): type the mini retrain tests and helpers to the strict mypy profile * docs: regenerate the indexes and the citation map after rebasing
lusoris
force-pushed
the
test/ai-mini-retrain
branch
from
October 7, 2026 12:45
04da091 to
bf9986d
Compare
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
The retrain tooling now runs end to end in CI on a generated corpus.
make mini-retrain(about 40 s) runs extraction, feature checks, combination, training and export ofvmaf_tiny_v2..v4andfr_regressor_v1, validation, registry validation and a PLCC / SROCC / RMSE gate, with the runbook's scripts and flags. Every stage writes a manifest; a killed run resumes from the manifests; a missing or corrupt input fails with the stage name before anything runs. Stacked work (codec-aware FR regressors, ensemble, NR head, QAT, quantisation, model cards, predictor, K150K stage, resource plan) is not in this PR.Defects found on the way:
motionwas NaN in every extracted row (fixed here); seven more are recorded asdocs/state.mdrows (runbook flags, validators passing NaN, trainers without a finite check, extraction swallowing failures, registry upsert dropping fields, K150K identity rows in the teacher fit (maintainer decision), missing signing bundles).Evidence
Measured with the dev image's torch 2.14.1 / onnxruntime 1.30.0 / ONNX 1.22 on CPU (4 cores) and
vmaf1.0.0-rc.2.pytest ai/e2e ai/tests/test_pipeline.py test_retrain_checks.py test_mini_corpus.py test_feature_extractor_unit.pytrain_tiny_v2, then re-runminithresholds prove plumbing only, see runbook section 13)Failing-first. Real defect: the first run stopped at
verify_featureswithcolumn(s) ['motion'] are NaN in every row;test_lookup_motion_reads_the_sad_score_libvmaf_emitsfails without the alias. Planted defects (each stops at the named stage with a named error): dropped column, NaN feature, 0-1 label scale, wrong teacher, all-NaN column, truncated table; a constant-output model passesvalidate_vmaf_tiny_v3.py("PASS - PLCC nan >= gate") and is stopped by the gate stage. Mutations: removing the key check, output-digest check, preflight, empty-file check, exit-code check, therunningguard each fail named unit tests; removing the finite check, the dead-column check or the gate's NaN handling fails the matching e2e test.Type
feat— new featurefix— bug fixbuild/ci— tooling / infraChecklist
make format && make lintgreen locally (hooks on);praetorctl auditclean.docs/adr/_index_fragments/.docs/state.mdupdated: 7 rows opened, 1 closed (T-AI-FULL-FEATURES-MOTION-ALL-NAN-2026-10-05).Deep-dive deliverables (ADR-0108)
## Alternatives considered.AGENTS.mdinvariant note —ai/AGENTS.d/mini-retrain.md.changelog.d/added/mini-retrain-pipeline.md,changelog.d/fixed/full-features-motion-nan.md.docs/rebase-notes.md.Docs:
docs/ai/retrain-runbook-1246.mdsection 13.Reproducer
meson setup build core && ninja -C build tools/vmaf make mini-retrain MINI_RETRAIN_DIR=runs/mini VMAF_BIN=build/tools/vmaf make mini-retrain-testKnown follow-ups
Stacked PRs: runbook flag fixes with a runbook-lint test; validators and trainers refuse NaN; extraction failure accounting; registry upsert; remaining model families and stages; resource plan. Hardware: the run used the CPU only.