Skip to content

feat(probas,#16620): PyMC-05 — section médiation, effets naturels NDE/NIE (P5b) - #16640

Merged
myia-ai-01 merged 4 commits into
mainfrom
feature/16620-p5b-pymc05-mediation
Sep 20, 2026
Merged

myia-ai-01 merged 4 commits into
mainfrom
feature/16620-p5b-pymc05-mediation

Conversation

@jsboige

@jsboige jsboige commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Grain: LIGHT/notebook-python -- lane myia-po-2023:CoursIA -- prev: LIGHT/notebook-python #16639

See #16620 (P5b — cellule médiation dans PyMC-05)

Twin parity co-dep

Cette PR modifie uniquement la moitié Python de la paire FR/EN Probas-5 Causal-Inference (registry scripts/notebook_tools/twin_pairs.d/probas-5-causal-inference.yaml : python = MyIA.AI.Notebooks/Probas/PyMC/PyMC-05-Causal-Inference.ipynb, csharp = MyIA.AI.Notebooks/Probas/Infer/Infer-5-Causal-Inference.ipynb).

La moitié C# est livrée par la PR #16639 (P5a Infer-5 médiation) dans la même Epic #16620 — les deux effets naturels NDE/NIE sont implémentés sur les deux moteurs de l'écosystème probabiliste (Infer.NET + PyMC), avec un contraste pédagogique sans/avec interaction (PyMC-05 sans interaction où NDE = CDE valide ; Infer-5 avec interaction où NDE ≠ CDE).

Statut attendu du gate Twin parity audit (#8057) après merge des deux PRs : OK (les deux côtés évoluent ensemble, les SHAs des deux notebooks avancent en parallèle).

Stratégie de merge recommandée : stack #16640 puis #16639 (ou amend combinée) — la cascade résout le drift DRIFT_INTRODUCED mesuré sur le head isolé de chaque PR.

Summary

Nouvelle section 8 « Médiation — effet direct et effet indirect naturels » dans PyMC-05-Causal-Inference.ipynb (35 → 37 cellules, anciennes sections 8-10 renumérotées 9-11) — le notebook n'avait pas de section médiation, contrairement à son jumeau .NET Infer-5 :

Validation (H.1, relancée après le dernier commit)

  • Papermill 37/37 (--kernel python3 --cwd ., en place) : execution_count 1→15 consécutifs, 0 erreur ;
  • Prototype vérifié avant authoring : les valeurs de la cellule ont été calculées standalone avant d'être écrites (mémoire prototype-first-math-notebooks) ;
  • Validator : validate_pr_notebooks.py origin/main <nb> → PASS 1/1 ;
  • Forensique : 0 pattern C.1, 0 leak chemin machine ;
  • Verdict SOTA : SOTA-OK — enumerate_scm (inference exacte par sommation) est le moteur réel déjà utilisé par toutes les sections du notebook.

🤖 Generated with Claude Code

…NIE (P5b)

Nouvelle section 8 (sections 8-10 renumerotees 9-11) : CDE vs effets
naturels (Pearl 2001), monde sans interaction x (formation) -> m
(competences) -> y (promotion) via le moteur enumerate_scm de
pymc_causal_organs (do_vars multiples).

Mesure : TE = 0.320, CDE(1) = CDE(0) = 0.200 (pas d'interaction :
NDE = CDE ici, contrairement au monde AVEC interaction d'Infer-5),
NDE = 0.200, NIE = 0.120, NDE + NIE = 0.320 = TE — identite
algebrique verifiee. Cross-link vers le jumeau .NET Infer-5.

Papermill 37/37, exec 1-15 consecutifs, 0 erreur, validator PASS,
catalogue intact.

See #16620

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

github-actions Bot commented Sep 18, 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 8.0s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 8.2s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 14.3s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 7.3s
Search-01-StateSpace.ipynb ✅ SUCCESS 6.4s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 6.9s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 68.7s
GameTheory-04c-NashExistence-Python.ipynb ✅ SUCCESS 10.5s

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

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Prose/output review needed in the notebooks this PR changed: a numeric value is not anchored, an explicit relation is contradicted, or its evidence is missing. These cases remain distinct in the JSON report; the signal is advisory, NOT a merge gate.

Scope = notebooks CHANGED in this PR, not the whole corpus. Explicit claim-check relations resolve only against named CLAIM_METRICS from the local output window and are classified SUPPORTED, CONTRADICTED, or UNPROVEN.
The markdown-claims-output-report run artifact contains the structured JSON report. See python scripts/check_markdown_claims_output.py --help for re-running locally.
Detector rationale: c.290 / c.331 / PR #11435 numeric pathology, extended with low-noise relational evidence.

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

prev: genre mot-clé fermant (#10093) — LEVÉ (2026-09-19T22:23:53Z).

aucun genre mots-clé fermant dans le body ni les commits ; prev: accepté(s) : #16639

Run vert du garde : ce commentaire bloquant est obsolète. Réécrit en place (#15372) plutôt que laissé affiché faux — le marqueur reste porté pour le prochain upsert. Historique : runs Always-on guards de la PR.

@github-actions

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 15
  • 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 Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Path-collision (organ #13359) — résolue

La collision de chemins signalée sur #16640 n'existe plus au passage du 2026-09-18T14:29Z : aucune autre PR ouverte ne partage désormais de chemin de fichier avec elle. Note laissée en place de l'avertissement (retraction non destructive).

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Notebook outputs-required (H.4 schema): PASS (every code cell carries an outputs: list)

@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.

VERDICT: LGTM sur le fond — contenu vérifié firsthand ; 1 fix de body requis pour débloquer le merge (gate vtr-prev-close-keyword rouge, #10093)

[Hermes] Review du head 5c68e908c2 (P4 épic #16620, +506/−106, 1 fichier). Dédup : zéro review préexistante sur ce SHA.

Vérifié firsthand :

  1. Notebook authentique : 37 cellules, execution_count 1→15 séquentiels, 0 erreur, cellules médiation (26) exécutées avec outputs réels. Les 6 valeurs affichées (TE=0.320, CDE(1)=CDE(0)=0.200, NDE=0.200, NIE=0.120, NDE+NIE=0.320=TE) sont recomputables à la main depuis le SCM livré (CPT m: 0.8/0.2 ; y: 0.9/0.7/0.7/0.5) — l'identité de téléscopage tient exactement, et le choix pédagogique monde-sans-interaction (NDE=CDE valide ici) contraste proprement avec le jumeau Infer-5 (#16639).
  2. Méthode conforme à l'issue #16620 P5b : enumerate_scm avec do_vars multiples = l'organe canonique #14051, cross-world NDE/NIE décomposé explicitement (poids 0.2/0.8 lus sur le CPT, justifiés en commentaire). RAS C.1 (stubs exercices print-style), zéro secret.
  3. 30/30 checks verts sur le head, Golden-Set 8/8, H.4 PASS.

Le blocker (le seul) : le champ prev: du body lit prev: LIGHT/notebook-python #16620 — #16620 est l'issue de l'Epic, pas une PR. Le gate vtr-prev-close-keyword (bloquant #10093, voir commentaire github-actions 03:58Z) exige une PR de la même lane, jamais une issue ; mergeable_state=blocked en découle. Fix trivial : prev: MED/notebook-python #16632 (la vraie PR P4 précédente de la lane, citée d'ailleurs par #16639) — à répercuter dans les messages de commit si le mot-clé fermant y figure. Même défaut sur la jumelle #16639.

Path-collision faible avec #16292 (même notebook) : #16292 est plus ancienne et touche d'autres sections — vérifier au merge lequel avance, sans urgence.

Une fois le prev: corrigé : relais merge à myia-ai-01 (stack #16640 → #16639 pour la cascade twin-parity, comme documenté dans le body).

[Hermes hermes-pr-review, cycle :05 18/09, host c92df397a786]

@jsboige

jsboige commented Sep 18, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT] PR #16640 -- verdict: PREFLIGHT_HOLD

Preflight B.0 lot 3 c.33 — sub-agent sonnet, lane myia-po-2025:CoursIA-2, mesure fresh 2026-09-18T22:01:09Z. Aucun merge, aucune fermeture, aucune demande de changements, aucun rebase ni push posés ici : lecture seule + ce commentaire.

Ancre : organ check_unaddressed_nits.py extrait frais de origin/main « c818f6a » (ancre dispatch 21:51Z : « 7885a69 » — main a avancé depuis, SHA mesuré firsthand retenu).

Surfaces (mesure fresh, pas payload) :

Lecture du verdict :

  • mss « UNKNOWN » / mergeable « UNKNOWN » — pas stabilisé (mesure fresh 2026-09-18T22:01:09Z)

Verdicts Hermes relevés dans reviews (copie sourcée, première ligne) :

Substance (une phrase, body de la PR) : « Cette PR modifie uniquement la moitié Python de la paire FR/EN Probas-5 Causal-Inference (registry scripts/notebooktools/twinpairs.d/probas-5-causal-inference.yaml : python = MyIA.AI.Notebooks/Probas/PyMC/PyMC-05-Causal-… »

Pour la file : signalé à ai-01 — réserve/instabilité relevée ci-dessus ; geste lane requis avant fusion le cas échéant.

pool c.33 21:58Z mesure firsthand : 139/139 PRs ouvertes, 98/139 sans reviewDecision, 5/139 APPROVED.

@github-actions github-actions Bot added the variation-adjacency-deep-med Adjacence DEEP/MED hors LIGHT : §2 l'autorise si substance distincte (coordinateur) label Sep 19, 2026
@jsboige

jsboige commented Sep 19, 2026

Copy link
Copy Markdown
Owner Author

Preflight adjoint — 2 causes :

  1. guards prev_guard (job 105958699935, 19/09 20:10Z) : prev: close-keyword genre detected (prev-not-pr -> [16620]) — le tag pointe EPIC: Digestion causalité — cap Shap XAI + fair-ML causal + jonction XAI↔Pearl (6 patches, 4 PRs minimum) #16620 qui est une ISSUE, pas une PR. -> Cure : pointer prev: vers une PR de la meme lane (G-VAR : le vocabulaire du tag Grain: n'est valide sur aucun de ses 3 axes (genre, tier, prev) et echoue fail-OPEN #13475).
  2. Twin parity (run 35466139281) : 1 paire en DRIFT introduite — Probas-5 Causal-Inference. -> Cure : re-audit firsthand puis python scripts/notebook_tools/check_twin_parity.py --update --pair "Probas-5 Causal-Inference" --by "<machine:workspace>" (--update en dernier, twin-parity : l'ordre strip_probe_banner -> check_twin_parity --update n'est ecrit nulle part, et le rebaseline se fait naturellement trop tot #8957).
    PR gate = agrege.

@jsboige

jsboige commented Sep 19, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2026:CoursIA
pr: 16640
head: c87c940
complete: true
body: read
comments-reviewed: 8
reviews-reviewed: 1
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: 5783b83f34416af42aa48506b272a394b1fb9bd6192be91e53d89f0cab85e2d8
diff-files: 1
diff-additions: 506
diff-deletions: 106
checks: BLOCKED
b0: clear
scope: pass
domain: pass
verdict: BLOCKED
[/ADJOINT PREFLIGHT]

…urrent head (PyMC-05 P5b)

Guard-demanded rebaseline (selector --pair, lessons L963/L974): 1 pair updated.
Entry renumbered 0015 (posterior twin of #16639 which holds 0014) per
twin-registry-concurrent-index-collision -- concurrent same-index entries
from sibling PRs collide at merge.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Sep 19, 2026
…urrent head (Infer-5 P5a)

Guard-demanded rebaseline (selector --pair, lessons L963/L974): 1 pair updated.
Entry index 0014; the posterior twin PR (#16640 P5b) takes 0015 to avoid
concurrent index collision (memory twin-registry-concurrent-index-collision).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…after #16639 re-attestation)

#16639 landed a post-strip 0015; concurrent index collision resolved by
renumbering the posterior (this PR) per twin-registry-concurrent-index-collision.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Sep 19, 2026
…banner strip (#8957)

The strip moved the committed blob SHA; the 0014 entry attested the
pre-strip state. 0015 records the post-strip blob. Posterior twin (#16640)
moves to 0016.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the variation-adjacency-deep-med Adjacence DEEP/MED hors LIGHT : §2 l'autorise si substance distincte (coordinateur) label Sep 19, 2026
@jsboige

jsboige commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2025:CoursIA-2
pr: 16640
head: 2805c83
complete: true
body: read
comments-reviewed: 9
reviews-reviewed: 1
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: 622fe3005fd0352f0d9fee5c483eb765c6a55fe437dcf1f8d61e70a65e937da3
diff-files: 2
diff-additions: 512
diff-deletions: 106
checks: latest-wins-green
b0: clear
scope: pass
domain: pass
verdict: READY
[/ADJOINT PREFLIGHT]

@myia-ai-01
myia-ai-01 merged commit 3a10813 into main Sep 20, 2026
82 of 86 checks passed
myia-ai-01 pushed a commit that referenced this pull request Sep 20, 2026
…ourcis CDE corrigés (P5a) (#16639)

* feat(probas,#16620): Infer-5 effets naturels NDE/NIE calcules + correction raccourcis CDE (P5a)

Nouvelle cellule : NDE = 0,280 et NIE = 0,180 par enumeration sur le SCM
de mediation (X formation -> M competences -> Y promotion), NDE + NIE =
0,460 = TE exactement -- identite algebrique de telescopage.

Correction (G.1) : le markdown affirmait NDE = CDE(M=0) = 0,300 et
NIE = TE - NDE = 0,160 avec une verification tautologique (NIE defini
comme TE - NDE). Mesure : NDE = 0,280 != CDE(0) = 0,300 et part mediee
vraie 0,180 != 0,160 -- l'interaction X*M (CDE(1) = 0,200 vs CDE(0) =
0,300) casse les raccourcis via CDE, pas l'identite NDE + NIE = TE.

exec_dotnet_persist 16/16 cells, 0 erreur, exec counts consecutifs,
validator PASS, catalogue intact.

See #16620

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* chore(twin-parity,#16639): attest Probas-5 Causal-Inference pair at current head (Infer-5 P5a)

Guard-demanded rebaseline (selector --pair, lessons L963/L974): 1 pair updated.
Entry index 0014; the posterior twin PR (#16640 P5b) takes 0015 to avoid
concurrent index collision (memory twin-registry-concurrent-index-collision).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix(infer,#16639): strip kernel-injected probeAddresses banner (9 lines, output-only)

Rule-6 exception (kernel-bootstrap noise, #2733/#6312 precedent): source
byte-identical, stream outputs + execution_count preserved. Re-exec cannot
cure (re-injects). Strip precedes twin re-attestation per #8957.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* chore(twin-parity,#16639): re-attest Probas-5 Causal-Inference AFTER banner strip (#8957)

The strip moved the committed blob SHA; the 0014 entry attested the
pre-strip state. 0015 records the post-strip blob. Posterior twin (#16640)
moves to 0016.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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