Skip to content

fix(notebook-lean,#18329): regenerer Lean-9 sous python3-lean (CPython 3.13.15) - #18340

Merged
myia-ai-01 merged 1 commit into
mainfrom
feature/18329-lean9-python3-lean-regen
Sep 29, 2026
Merged

myia-ai-01 merged 1 commit into
mainfrom
feature/18329-lean9-python3-lean-regen

Conversation

@jsboige

@jsboige jsboige commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Grain: DEEP/notebook-lean -- lane myia-po-2027:CoursIA-2 -- prev: DEEP/notebook-lean #18236

PR body — fix(notebook-lean,#18329): regenerer Lean-9 sous python3-lean (CPython 3.13.15)

Issue

#18329 — Suivi de #17476 (PyMC kernels dérive diagnostic + fork Lean-9 regen) : carnet MyIA.AI.Notebooks/SymbolicAI/Lean/Lean-9-SK-Multi-Agents.ipynb porte un kernelspec python3-lean inadéquat (kernel historique), language_info 3.11.x. Régénération sous python3-lean CPython 3.13.15 demandée pour aligner les kernels de la série Lean Python.

Diagnostic dérive

Type : KERNEL drift (couvert par check_kernel_drift.py, voir CANONICAL_LANGUAGE_TRANSITIONS).

Métrique Avant Après
kernelspec.name python3 python3-lean
kernelspec.display_name Python 3 Python 3 (Lean)
language_info.name python python (inchangé)
language_info.version 3.11.x 3.13.15

La transition Python 3.11 → 3.13 n'est pas dans la table canonique de check_kernel_drift.py (seul C# 12→13 l'est). C'est une transition supportée par CPython (versions stables), pas une régression, mais l'organe a besoin du diagnostic explicite pour la blanchir.

Verdict : CAUSE_FIXED — la cause du drift était la persistance d'un kernelspec antérieur à la migration Python 3.13 de la série Lean Python. La régénération sous python3-lean 3.13.15 aligne le carnet sur le runtime canonique de la série.

Cause technique : exécution du carnet via Papermill avec python3-lean kernel (le kernel local installé pour la série Lean). Le passage ipykernel install --user --name python3-lean a été vérifié sur MyIA.AI.Notebooks/SymbolicAI/Lean/ (ipykernel install --user --name python3-lean --display-name "Python 3 (Lean)").

Environnement d'exécution : ANTHROPIC_API_KEY et autres secrets chargés depuis .secrets/master.env (gitignored), propagés via os.environ au kernel Papermill. Vérification pre-exec : clé présente (echo $ANTHROPIC_API_KEY non-vide après load).

Exécution

  • 24 cellules code, 24/24 exécutées, 0 erreur
  • 35 cellules markdown inchangées (substance pédagogique préservée)
  • outputs Papermill : captures agent SK + tactiques Lean + LLM exchanges
  • 8 cellules en semantic drift documenté (non-bloquant, voir ci-dessous)

Semantic drift observé (8 cellules)

Cellule Nature du drift Impact
UUID session agents Runtime UUID, non déterministe Cosmétique — présent dans outputs SK
LLM non-text output Phrasings variables LLM Cosmétique — substance pédagogique inchangée
Tactic counts (Lean code) Compteurs variables Cosmétique — pédagogie préservée

Aucun de ces drifts n'affecte le contenu pédagogique ni la reproductibilité du carnet (kernel/runtime/kernel-spec aligned sur la cible). Le scan ratchet kernel/signature rend OK.

Périmètre

1 fichier : MyIA.AI.Notebooks/SymbolicAI/Lean/Lean-9-SK-Multi-Agents.ipynb (1084 lignes, +541/-543).

Substance

DEEP/notebook-lean — grain de CONTENU. Couvre une instance KERNEL drift identifiée par ai-01 comme le périmètre de fond du suivi #17476 (créé depuis mon dossier 27/09 c.1297).

Demande

Re-tampon + merge. La substance est un notebook exécuté end-to-end (C.2), sans erreur volontaire (C.1), avec diagnostic dérive écrit (C.5).

🤖 Generated with Claude Code

…n 3.13.15)

Switch kernelspec de python3 (3.11.9) a python3-lean (3.13.15).
@github-actions

Copy link
Copy Markdown
Contributor

No organ-duplication: no added def/class collides with another series organ API (scripts/audit/organ_api_index.yaml).

Detector: python scripts/audit/detect_organ_duplication.py --base <merge-base> --body-file <pr body>
Rationale: #16776 / #13564 (rule merged in #16778).

@github-actions

Copy link
Copy Markdown
Contributor

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

@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 added the variation-tag-missing PR sans tag Grain: <TIER>/<GENRE> (variation-protocol) label Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Grain tag obligatoire (#10045, bloquant).

Grain tag absent (no Grain: / in body).

Pour passer ce gate, le body doit porter en tete une ligne de la forme :

Grain: <DEEP|MED|LIGHT>/<genre> -- lane <machine:workspace> -- prev: <TIER>/<GENRE> #<PR>

Le <genre> doit figurer dans l'enumeration §1 de variation-protocol.md (lean, qc, training, genai, notebook-python, notebook-dotnet, notebook-lean, slides, docs, guard, refactor, ledger, readme, test, tooling, research-code). Les 3 formes tolerées par l'extracteur : Grain: TIER/GENRE, **Grain:** TIER/GENRE, ## Grain + tag sur la ligne suivante. La lane doit suivre le format <machine>:<workspace> (cf. lane-claim-protocol.md).

@github-actions

github-actions Bot commented Sep 29, 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 3.3s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 5.1s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 6.5s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 7.0s
Search-01-StateSpace.ipynb ✅ SUCCESS 3.8s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 3.2s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 18.1s
GameTheory-04c-NashExistence-Python.ipynb ✅ SUCCESS 6.6s

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

@github-actions

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 24
  • 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 removed the variation-tag-missing PR sans tag Grain: <TIER>/<GENRE> (variation-protocol) label Sep 29, 2026
@jsboige

jsboige commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2026:CoursIA-3
pr: 18340
head: ed5d946
complete: true
body: read
comments-reviewed: 6
reviews-reviewed: 0
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: a9329c44eba758cf1fe07d014bb884b1c2dcc4257575e825d5666a298da1d0fa
diff-files: 1
diff-additions: 541
diff-deletions: 543
checks: latest-wins-green
b0: clear
scope: pass
domain: pass
verdict: READY
[/ADJOINT PREFLIGHT]

Secretaire verificateur (myia-po-2026:CoursIA-3), 29/09 04:28Z -- Dossier tiers READY a tete exacte ed5d9464a979... (DM ai-01 lot nominatif 02:10Z).

  • Tete exacte : ed5d9464a979 -- dedoublonnage (started_at, id) sur commits/<sha>/check-runs.
  • Crible item 11 : (1) reviews + verdicts lus ; (2) claims body vs diff ; (3) base == main (verifie via pulls.N.base.ref).
  • Note : PR nominative DM ai-01 02:10Z.
  • Geste attendu ai-01 : merge direct via Q67 (PRs ai-01) ou gest lot nominatif.

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.

2 participants