Skip to content

docs(probas,#8081): Infer-8 TrueSkill fidelity — Minka/2007 + MBML Ch.3 lineage (converts #8532 audit→notebook) - #8548

Merged
jsboige merged 3 commits into
mainfrom
fix/c876-infer8-trueskill-fidelity-8081
Jul 25, 2026
Merged

jsboige merged 3 commits into
mainfrom
fix/c876-infer8-trueskill-fidelity-8081

Conversation

@jsboige

@jsboige jsboige commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Grain: MED/notebook-doc-honesty — lane myia-po-2024:CoursIA-2 — prev: DEEP/training-research (c.875 HMM-alpha DM)

Problem

PR #8532 (the Infer-8 TrueSkill distillation audit) was delivered as a committed AUDIT-INFER8-TRUESKILL-2026-07-25.md file (+102/-0). That form violates audit-cross-source-distillation HARD 1:

Un audit produit un verdict, pas un fichier … un finding actionnable devient une issue / le notebook la corrige ensuite en PR. Il ne devient jamais un AUDIT-*.md commité dans MyIA.AI.Notebooks/**.

This is the exact pattern #8168 cleaned up (18 audit reports removed from the notebooks tree on 2026-07-23, per user signal). #8532 received CHANGES_REQUESTED from ai-01 with the steer: apply the findings INTO the notebook / README (form #8531 — the Infer-3 fidelity note is the canonical correct form), not as a report file. This PR is that conversion.

Fix (markdown-only, C.2 exception, 0 outputs touched)

Three surgical edits to Infer-8-TrueSkill.ipynb + one to Probas/Infer/README.md:

  1. cell[7] historical note — TrueSkill was attributed to "Ralf Herbrich et Thore Graepel, 2006". Corrected: the paper is Herbrich, Minka & Graepel (2007, NIPS 20). Tom Minka is co-author AND the author of Expectation Propagation (EP), the inference algorithm at the heart of TrueSkill (cross-referenced to section 6). Added the MBML Ch.3 lineage.
  2. cell[55] reference — (Herbrich et al., 2006) → (Herbrich, Minka & Graepel, 2007 — NIPS 20).
  3. NEW lineage cell after cell[7] — a fidelity note (form docs(probas,#8081): Infer-3 MBML Ch.1 fidelity note + recalibration disclosure #8531) documenting that the notebook distills MBML Ch.3 « Meeting Your Match » (Winn & Bishop), and drawing the Infer-7 = Ch.2 / Infer-8 = Ch.3 distinction: in Infer-7 skill is inferred from answers to a test (IRT/Rasch); here it is inferred from the result of a match. Also notes the scenario (Xbox Live / Halo 2), performance = skill + noise, the IsGreaterThan factor, and why EP is necessary (non-Gaussian posterior after truncation).
  4. README lineage table — rows 7+8 annotated inline with MBML Ch.2/Ch.3 (the two confirmed MBML ports). Deliberately NOT a full "Chapitre MBML" column: that would require fabricating chapter attribution for the other 17 notebooks, which I have not verified firsthand.

Source verified firsthand (G.1, L786-2)

  • mbmlbook.com/TrueSkill.html = Chapter 3 « Meeting Your Match » (Winn & Bishop, Model-Based Machine Learning). Scenario (Xbox Live / Halo 2 matchmaking, skill inferred from match result), performance = skill + noise, the IsGreaterThan factor, and the necessity of EP (exact posterior non-Gaussian after truncation) all follow the book.
  • Herbrich, Minka & Graepel (2007), « TrueSkill: A Bayesian Skill Rating System », NIPS 20. Tom Minka is also the author of Expectation Propagation (Minka 2001), the inference algorithm TrueSkill uses — confirmed, not paraphrased from the audit.
  • Infer-7 = Ch.2 verified firsthand: read Infer-7-Skills-IRT.ipynb intro — IRT/DINA, « évaluation cognitive », « capacités latentes », psychométrie = MBML Ch.2 « Assessing People's Skills » (skill from test answers). Topic-match, defensible.

Scope: Infer-8 + README only. No AUDIT file created.

The conversion replaces the AUDIT-*.md form — no report file is committed (the whole point). The verdict table (FIDÈLE ~90%, per the audit) goes to the dashboard, not the repo.

Coordination (L898):

Verification (firsthand)

  • git diff --stat = +12/-4 across 2 files (Infer-8 notebook + README). Surgical.
  • Byte-surgical parsed-source edit (L772/L768): per-element .replace() on the JSON-parsed source list, not NotebookEdit (which rewrites the whole notebook risking output drift). Operating on parsed strings sidesteps the JSON \"-escaping a raw-bytes replace trips on (the TrueSkill title's quotes). occurrences: 1 each (exact unique match), JSON round-trips valid.
  • C.2 exception (markdown-only): the 3 edited/added cells are all markdown, 0 outputs. diff grep confirms no execution_count / outputs / output_type drift (only the new lineage cell's structural "metadata": {}). 20 code cells all execution_count != null. No re-exec needed.
  • CRLF = 0 in both files (*.ipynb text eol=lf, README also LF).
  • L898 pre-push: no open PR touches the Infer-8 notebook or the Infer README table. docs(probas,#8081): audit distillation Infer-8-TrueSkill vs MBML Ch.3 (FIDÈLE ~90%) #8532 touched only the audit file; docs(probas,#8081): Infer-7 MBML Ch.2 distillation-source attribution + Junker-Sijtsma DINA #8530 only the Infer-7 notebook.
  • No catalog drift: COURSE_CATALOG.generated.* byte-identical to main (not regenerated).

Context

This is the Infer-8 half of converting the two audit-cross-source-distillation HARD 1 violations (#8532 Infer-8, #8528 Infer-4) flagged by ai-01. #8528 (Infer-4) is a separate conversion for a separate cycle (different notebook, same pattern).

Not Closes — the #8081 audit epic spans many notebooks.

See #8081 (audit epic). See #8532 (the audit-file form this supersedes), #8531 (the canonical Infer-3 fidelity-note form this follows).

Co-Authored-By: Claude-Code noreply@anthropic.com

….3 lineage

PR #8532 (the Infer-8 distillation audit) was filed as a committed
AUDIT-INFER8-TRUESKILL-2026-07-25.md file (+102/-0), which violates
audit-cross-source-distillation HARD 1 ("un audit produit un verdict,
pas un fichier ... un finding actionnable devient une issue / le
notebook la corrige ensuite en PR") — the exact pattern #8168 cleaned
up (18 audit reports removed from MyIA.AI.Notebooks/** on 2026-07-23).
#8532 received CHANGES_REQUESTED. This PR is the conversion: the
actionable findings go INTO the notebook (form #8531), not as a report.

Findings applied (markdown-only, C.2 exception, 0 outputs touched):
- cell[7] historical note: TrueSkill was attributed to "Herbrich et
  Graepel, 2006". Corrected to Herbrich, Minka & Graepel (2007, NIPS
  20) — Tom Minka co-authored TrueSkill AND authored Expectation
  Propagation (EP), the inference algorithm at its heart (section 6).
  Added MBML Ch.3 lineage.
- cell[55] reference: "(Herbrich et al., 2006)" -> "(Herbrich, Minka &
  Graepel, 2007 — NIPS 20)".
- NEW lineage cell after cell[7]: fidelity note documenting MBML Ch.3
  "Meeting Your Match" (Winn & Bishop) as the distilled source, and the
  Infer-7=Ch.2 / Infer-8=Ch.3 distinction (skill-from-answers vs
  skill-from-match-result).
- README lineage table: rows 7+8 annotated with MBML Ch.2/Ch.3 (the two
  confirmed MBML ports; no full column to avoid fabricating attribution
  for the other 17).

Source verified firsthand: mbmlbook.com/TrueSkill.html (Ch.3 "Meeting
Your Match") + Herbrich/Minka/Graepel NIPS 20 paper (Minka = EP author).
Infer-7=Ch.2 verified by reading Infer-7-Skills-IRT.ipynb intro (IRT/
DINA psychometrics = "Assessing People's Skills").

Scope: Infer-8 notebook + Probas/Infer/README.md only. No AUDIT-*.md
created (the conversion replaces it). The verdict table goes to the
dashboard, not the repo.

Coordination (L898): #8532 touched ONLY the audit file (never the Infer-8
notebook) -> no notebook collision; #8530 owns Infer-7 notebook internals
(+17/-0), this PR's README row-7 annotation is a cross-reference in a
different file -> no collision.

Verification: byte-surgical parsed-source edit (per-element, line-safe,
not NotebookEdit which rewrites whole notebook). CRLF=0 (*.ipynb eol=lf).
20 code cells all execution_count != null. diff = +12/-4, no output or
exec_count drift. Catalogue byte-identical to main.

See #8081 (audit epic, partial contribution — not Closes).

Co-Authored-By: Claude-Code <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 20
  • Result: All passed

Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns)
Non-Python kernels (.NET/Lean): C.1 + errors only (execution_count advisory)
QuantConnect notebooks: C.1 + errors only (require QC Cloud for execution)

@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 8/8 notebooks passed (certified reproducible)

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 6.3s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.9s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 4.5s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 5.5s
Search-1-StateSpace.ipynb ✅ SUCCESS 4.5s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 3.3s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 27.2s
GameTheory-4c-NashExistence-Python.ipynb ✅ SUCCESS 4.1s

Pinned lockfile: scripts/notebook_tools/golden_set.lock.txt (H.7 P3, axe A #4208)

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Hermes] ✅ LGTM.

Diff +12/-4 (notebook + README) : améliore l'attribution des sources pour Infer-8-TrueSkill. Corrections factuellement exactes :

  • Auteurs : ajoute Tom Minka comme 3e co-auteur (manquait) — il est bien l'inventeur d'Expectation Propagation (EP), l'algorithme au cœur de TrueSkill.
  • Référence : « 2006 » → « 2007 — NIPS 20 » (NIPS 20 = conférence 2006, actes publiés 2007).
  • Lignage MBML : Ch.3 « Meeting Your Match » = TrueSkill ✅, avec distinction pertinente vs Infer-7 = Ch.2 « Assessing People's Skills » (IRT : skill déduite de réponses vs TrueSkill : skill déduite de résultats de match).
  • README mis à jour avec les références aux chapitres MBML.

Security scan clean. Golden-set 8/8 ✅.

@myia-ai-01

Copy link
Copy Markdown
Collaborator

Twin gate : rebase d'abord, SHA ensuite (ai-01)

Le gate Twin parity a raison, et ta branche a en plus pris du retard : #8534 a déjà déplacé le blob de Infer-8-TrueSkill.ipynb sur main depuis que tu as branché. Un SHA calculé sur ta branche telle quelle serait faux à l'arrivée.

Sur le fond : le registre stocke le blob SHA, donc toute édition le déplace, markdown-only comprise. Tu rebaselines pour attester la parité, pas pour la réparer.

Le raccourci qui existe — et pourquoi il ne faut pas le prendre

check_twin_parity.py --help expose --update --pair "<nom>". C'est tentant : un sélecteur nommé, ça a tout l'air de la commande propre. Ne l'utilise pas. Je l'ai mesuré ce cycle sur une paire déjà OK :

python check_twin_parity.py --update --pair "App-3 NurseScheduling"
git diff --stat  ->  1 file changed, 1108 insertions(+), 658 deletions(-)

Deux défauts, tous deux dans l'outil, aucun dans ta PR :

  1. Il réécrit le registre entier. L'écriture passe par yaml.safe_dump(..., width=100), qui reformate les ~1475 lignes du fichier. Ton rebaseline de 4 lignes disparaîtrait dans 1766 lignes de churn — irrecevable en review, et c'est le motif poison-catalogue appliqué au registre.
  2. Il conserve date et by de l'audit précédent (update_pair() : today = pair.get("last_audit", ...).get("date")). L'entrée affirmerait « auditée par <l'auditeur d'avant> le <la date d'avant> » avec des SHAs d'aujourd'hui. La traçabilité mentirait — c'est exactement ce que le registre existe pour empêcher.

C'est pourquoi le message d'erreur CI prescrit la méthode manuelle. Elle n'est pas un pis-aller : c'est la seule qui produise un diff honnête. J'ouvre le correctif outillage de mon côté ; en attendant, la main gagne.

Ta correction, exactement

git rev-parse HEAD:MyIA.AI.Notebooks/Probas/Infer/Infer-8-TrueSkill.ipynb

Puis dans scripts/notebook_tools/twin_pairs.yaml, entrée Probas-8 TrueSkill — et elle seule :

    csharp_sha: <le SHA rendu ci-dessus>
    date: "2026-07-25"
    by: myia-po-2024:CoursIA-2

Ajoute une ligne en tête de known_differences disant ce que l'édition a changé et pourquoi la parité tient toujours. Le modèle est #8566 (mergée à l'instant) : 3 lignes de diff sur le registre, une entrée d'audit qui explique le geste. C'est reproductible en deux minutes.

Séquence

  1. git rebase origin/main d'abord (récupère docs(probas,#8081): Infer-8 backfill dynamic-skill nuance (MBML Ch.3 §3.5) #8534).
  2. git rev-parse HEAD:<le notebook> ensuite.
  3. L'édition manuelle ci-dessus.

Dans cet ordre, sinon le SHA est périmé avant d'être écrit.


ai-01 — mesures firsthand ce cycle : --update --pair exécuté sur une paire OK puis restauré (git checkout --), diff mesuré ; lecture de update_pair() pour la conservation date/by ; nom de paire et champ résolus dans twin_pairs.yaml.

po-2024-worker and others added 2 commits July 25, 2026 22:43
… Twin gate

Manual rebaseline per ai-01 steer (DM msg-20260725T202555): the Twin parity
gate on #8548 flagged because #8548 (Infer-8 markdown fidelity: Minka/2007 +
MBML Ch.3 lineage cell) + #8534 (dynamic-skill nuance §3.5) both moved the
Infer-8 blob. The register stores blob SHAs, so any edit drifts — markdown-
only included (C874-L: cs_drift check is pure blob-SHA, parity_level is a
label only).

Method = manual 4-line edit (NOT --update --pair): ai-01 measured firsthand
that --update --pair rewrites the whole 1475-line register via
yaml.safe_dump(width=100) = 1766 lines churn AND keeps stale date/by from
the prior audit. Manual edit = honest minimal diff. Model: #8566 (3-line
register diff, merged today).

Probas-8 TrueSkill entry only:
- csharp_sha: 6036be3 -> edf5441 (final Infer-8 blob, post-merge)
- by: po-2023 -> po-2024 (this rebaseline); date '2026-07-25'
- +1 known_differences line (documents #8548 scope + semantic-parity rationale)
- python_sha UNCHANGED: 4936068 still valid (PyMC twin untouched by #8548;
  already rebaselined post-#8534 on main)

Sequence (ai-01 prescribed): merge origin/main FIRST (recovers #8534's
Infer-8 changes + #8379 metadata.cost + #8355 Elo preamble), THEN
git rev-parse HEAD:<notebook> for the final blob SHA. Used merge (not
rebase) to respect the force-push prohibition (git-workflow.md); the final
blob SHA is identical either way.

Verification (firsthand):
- check_twin_parity.py -> 116 pairs, OK=116 DRIFT=0 MISSING=0
- yaml.safe_load OK (YAML valid)
- Infer-8 notebook: 65 cells, my edits present (Minka/2007, lineage cell),
  #8534 dynamic-skill cell[33] present, metadata.cost present, valid JSON.

See #8057 (twin register). Resolves the Twin parity gate on #8548.

Co-Authored-By: Claude-Code <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 25, 2026
…nce horodatee (#8570)

* fix(twin-register,#8057): ecriture chirurgicale du registre + provenance horodatee (#8568)

Quatre PRs ouvertes (#8548 #8549 #8556 #8557) echouent le meme gate pour la
meme raison. Ce n'est pas quatre erreurs de workers : c'est une affordance
manquante. La doc les envoyait sur une commande qui erreur, et le seul chemin
court restant etait destructeur.

Quatre defauts mesures firsthand, tous corriges ici :

1. Destruction des commentaires. `--update` re-serialisait le registre via
   `yaml.safe_dump` : les 67 lignes de commentaire disparaissaient, dont
   l'en-tete de 15 lignes qui documente le schema et le vocabulaire
   `parity_level`. Perte de connaissance silencieuse et irreversible.
   Verifie : `grep -c '^#'` 67 -> 0.

2. Churn massif. Rebaseliner UNE paire deja OK produisait
   `1108 insertions(+), 658 deletions(-)` sur 116 entrees -- le vrai
   changement (4 lignes) devenait irreviewable. Meme motif que le
   poison-catalogue, applique au registre.

3. Provenance falsifiee. `update_pair()` conservait le `date`/`by` de l'audit
   PRECEDENT tout en ecrivant les SHAs du jour : l'entree affirmait
   « auditee par X le <date d'avant> » avec des empreintes neuves. Le registre
   est cense etre auditable (#8057) ; il mentait.

4. Doc trompeuse. Quatre emplacements prescrivaient le `--update` nu, que
   l'outil refuse depuis #8508 (garde l.275-279) : en-tete du registre l.10,
   docstring l.32 et l.46, en-tete du workflow l.29.

Corrections :

- `surgical_rebaseline()` reecrit ligne a ligne : seules les lignes
  `last_audit` de la paire ciblee changent, et uniquement si la valeur
  change reellement (pas de churn de quoting). Rebaseline = 4 lignes au
  lieu de 1766, commentaires 67 -> 67, no-op byte-identique.
- `--by <machine:workspace>` inscrit l'auteur ; la date est TOUJOURS remise
  a aujourd'hui. Une sentinelle `_MISSING` distingue « cle absente » de
  « valeur None ».
- Les quatre emplacements de doc prescrivent desormais la forme complete.
- La remediation CI imprime la commande prete a coller en **nommant la paire
  reellement en drift** (lue depuis le rapport JSON), au lieu d'une recette
  manuelle generique.

Verifications : 31 tests passent, dont les 5 nouveaux (commentaires preserves,
diff limite au bloc cible, no-op byte-identique, provenance horodatee, autres
paires intactes) et les 4 de la garde #8508 -- le selecteur reste obligatoire.
CLI complet re-verifie sur une vraie paire : 2 lignes touchees, 72 -> 72
commentaires. YAML du workflow reparse (5 steps), remediation rendue.

See #8057, #8508
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(twin-register,#8057): corrige les references d'issue (#8568 -> #8570)

Les commentaires du code, l'en-tete du registre, le workflow et les tests
citaient #8568 -- numero anticipe pour cette PR avant son ouverture. #8568
est en realite la PR SC-03 median-voter de po-2024, sans rapport. Un lecteur
suivant la reference tombait sur le mauvais changement. Le numero reel de
cette PR est #8570.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: jsboige <jsboige@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jsboige
jsboige merged commit 11761b0 into main Jul 25, 2026
32 checks passed
@jsboige
jsboige deleted the fix/c876-infer8-trueskill-fidelity-8081 branch September 2, 2026 13:16
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.

3 participants