Skip to content

Fix(iit,#18064): IIT-01 -- prerequis alignes sur Python 3.9 (PyPhi 1.2.0) et sur le script de setup de la serie - #20618

Merged
myia-ai-01 merged 2 commits into
mainfrom
claude/18064-iit01-prerequis
Oct 16, 2026
Merged

myia-ai-01 merged 2 commits into
mainfrom
claude/18064-iit01-prerequis

Conversation

@jsboige

@jsboige jsboige commented Oct 14, 2026

Copy link
Copy Markdown
Owner

See #18064

Summary

Changes

  • MyIA.AI.Notebooks/IIT/IIT-01-IntroToPyPhi-Python.ipynb, cellule 0 (markdown), seule cellule modifiée :
    • bloc « Prérequis » : « Python 3.10+ » devient « Python 3.9 (obligatoire) », avec sa raison (collections.Iterable) ; une puce renvoie à la section « Environnement Python » du README de la série ;
    • section 2 : la remarque et le pré-requis passent à Python 3.9 ; conda create ... python=3.13 est remplacé par le renvoi aux scripts scripts/setup_pyphi_env.sh / .ps1 (env pyphi en Python 3.9, noyau enregistré) et au README pour les commandes manuelles ;
    • le noyau à sélectionner est nommé « Python 3 (PyPhi/IIT) », comme dans les métadonnées du carnet.
  • Le carnet ne recopie pas la recette manuelle du README, qui diverge du script (voir Signaux hors périmètre).

Verdicts

Constat Verdict Preuve
HIGH, DESCRIPTION_MISMATCH : le README impose Python 3.9, le carnet IIT-01 ne le dit pas CONFIRMED (le carnet disait 3.10+ et python=3.13) Avant, cellule 0 : - Python 3.10+ (environnement Conda recommandé) ; > **Pré-requis** : Python 3.10+ (recommandé). ; conda create --name pyphi python=3.13 -y. README (inchangé) : l.13, l.73, l.112-113, l.131, l.296-298
PyPhi 1.2.0 utilise collections.Iterable, retiré en 3.10+ CONFIRMED Sdist pyphi-1.2.0.tar.gz (PyPI) : pyphi/__init__.py:78 importe db ; pyphi/db.py:10 et pyphi/models/cmp.py:10 contiennent from collections import Iterable. Mesure locale : ImportError sous Python 3.12 et 3.13.
Métadonnées du carnet cohérentes avec 3.9 language_info.version = "3.9.25" ; kernelspec = {name: "pyphi", display_name: "Python 3 (PyPhi/IIT)"} ; sortie de la cellule 2 : pyphi deja installe (1.2.0).
Référence d'environnement cohérente docs/reference/kernels-runtime.md (env pyphi, Python 3.9) ; IIT/ICT-Series/pyproject.toml requires-python = ">=3.9,<3.10" ; IIT/scripts/setup_pyphi_env.sh PYTHON_VERSION="3.9"

Le constat cite des lignes du README (22, 138-142, 304-307) et un nom de carnet (IIT-01-IntroToPyPhi.ipynb) périmés ; le contenu a été vérifié à sa place actuelle. Aucun jumeau IIT-01*_en.ipynb sur origin/main.

Validation

Sur le commit cf2d33adb6 :

$ python -c "import nbformat; nb=nbformat.read('MyIA.AI.Notebooks/IIT/IIT-01-IntroToPyPhi-Python.ipynb', as_version=4); nbformat.validate(nb); print('nbformat.validate OK', nbformat.__version__)"
nbformat.validate OK 5.11.1

Comparaison cellule par cellule avec origin/main :

ncells base/new 43 43
changed cell indices: [0]
metadata equal: True
code cells unchanged (source+outputs+exec_count): True 16
$ git diff --stat origin/main...HEAD
MyIA.AI.Notebooks/IIT/IIT-01-IntroToPyPhi-Python.ipynb | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)

$ python scripts/notebook_tools/check_activity_leak.py --diff origin/main...HEAD
[OK] aucun passage d'activite dense ajoute (1 carnet(s) modifie(s) analyses, mentions isolees tolerees).

$ python scripts/notebook_tools/check_prose_quantitative_claims.py --diff origin/main...HEAD
[OK] aucun compteur quantitatif en prose.

Format JSON : json.dumps(nb, indent=1, ensure_ascii=False) + "\n" reproduit le fichier d'origine octet pour octet avant édition ; le diff ne réécrit que la cellule 0.

Mesure de l'import, sans exécuter le carnet :

$ /usr/bin/python3.12 -I -c "from collections import Iterable"
ImportError: cannot import name 'Iterable' from 'collections'
$ /usr/bin/python3.13 -I -c "from collections import Iterable"
ImportError: cannot import name 'Iterable' from 'collections'

import pyphi de bout en bout n'a pas été exécuté (ni Python 3.9 ni noyau pyphi sur cette machine) ; le chemin d'import est établi par la source. Le seul lien ajouté (./README.md) vise un fichier existant ; aucun README n'est modifié.

Review Checklist

  • Scope réel : une cellule markdown du carnet IIT-01. README non touché.
  • Validation automatisée post-fix : nbformat, comparaison cellule par cellule, check_activity_leak, check_prose_quantitative_claims relancés après le commit.
  • Cohérence pédagogique : plus aucune mention Python 3.10+ ni python=3.13 dans le carnet ; le noyau nommé est celui que les scripts enregistrent.
  • Exécution réelle : N/A, markdown seul (C.2).
  • Regression check : cellules de code, sorties et métadonnées identiques à origin/main.

Signaux hors périmètre (non traités ici)

Hors flotte : session cloud du mainteneur (exemption #17713), pas de lane ni de tag Grain.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LRbWZZHE9jZscr8ya3niWA


Generated by Claude Code

….2.0)

Le bloc Prérequis et la section 2 du carnet IIT-01 annonçaient Python 3.10+
et `conda create ... python=3.13`. PyPhi 1.2.0 importe `collections.Iterable`,
symbole retiré de Python 3.10 : l'import échoue. Le README de la série, le
pyproject de ICT-Series, les scripts de setup et les métadonnées du carnet
(language_info 3.9.25, kernelspec pyphi) indiquent tous 3.9.

Markdown seul (cellule 0). Aucune cellule de code ni sortie touchée.

Verdict du constat IIT/README.md (HIGH, DESCRIPTION_MISMATCH) : CONFIRMED.

See #18064

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LRbWZZHE9jZscr8ya3niWA
@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

Copy link
Copy Markdown
Contributor

✅ No unanchored measurement claim detected in the notebooks this PR changed.

Scope = notebooks CHANGED in this PR, not the whole corpus. The stale-claim-report run artifact holds the structured JSON.
Rationale: the sibling detector above only compares a claim to the outputs of the cells that PRECEDE it; a claim written in a cell that precedes its code (App-5-Timetabling c.2/c.4) is invisible to it, and a value imported from a twin notebook is never produced locally. See python scripts/check_stale_claims.py --help.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No factual mislabel detected in the notebooks this PR changed (entity counts and tuple formulas checked against nearby committed streams).

Scope = notebooks CHANGED in this PR, not the whole corpus. The factual-mislabel-report run artifact holds the structured JSON.
Rationale: pure ABSENCE of a claimed value is the sibling stale-claim detector's job; this one only reports CONTRADICTIONS between an adjacent code cell's stream and the markdown that describes it. See python scripts/check_factual_mislabel.py --help.

@github-actions github-actions Bot added the variation-tag-missing PR sans tag Grain: <TIER>/<GENRE> (variation-protocol) label Oct 14, 2026

jsboige commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

Avis « Prose/output review » (non bloquant) lu : aucun signalement n'est introduit par cette PR.

python scripts/check_markdown_claims_output.py --json IIT-01-IntroToPyPhi-Python.ipynb, lancé sur la base de la branche (42da0a74c1) puis sur la tête (cf2d33adb6) : 6 signalements des deux côtés, aucun nouveau (comparaison hors indices de cellule et hors extrait de contexte). Les valeurs signalées relèvent du contenu existant du carnet, hors du périmètre de cette PR (prérequis Python 3.9 / PyPhi 1.2.0). Les deux autres avis (stale-claim, factual-mislabel) sont verts.

Hors flotte : session cloud du mainteneur (exemption #17713).


Generated by Claude Code

jsboige commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

Check rouge Always-on guards -- 16 organes, 1 checkout sur la tête cf2d33adb6 : il ne vient pas de cette PR.

Hors flotte : session cloud du mainteneur (exemption #17713).


Generated by Claude Code

@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 PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 16
  • 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)

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

Review [Hermes] — lane myia-ai-01:hermes-agent (tier-âgé v1.1, slot 2)

Full read au head cf2d33a : 43 cellules, comparaison cellule par celluelle avec main, et contre-vérification du fond technique sur le sdist PyPI réel.

Vérifié mécaniquement :

  • Seule la cellule 0 (markdown) change — 16 cellules de code byte-identiques à main (source + outputs + exec_count), métadonnées inchangées. La contradiction initiale est bien réelle sur main : « Python 3.10+ » + conda create python=3.13 alors que les métadonnées du carnet disent language_info 3.9.25 / kernelspec pyphi.
  • Fond confirmé sur le vrai sdist pyphi-1.2.0.tar.gz (PyPI) : pyphi/__init__.py:78 importe db ; pyphi/db.py:10 et pyphi/models/cmp.py:10 contiennent from collections import Iterable — symbole retiré en 3.10, donc import pyphi lève ImportError sous 3.10+. La puce Prérequis du head est exacte.
  • Toutes les cibles du renvoi vivantes au head : IIT/scripts/setup_pyphi_env.sh (PYTHON_VERSION="3.9" l.28) et .ps1, docs/reference/kernels-runtime.md (§ « Série IIT/ICT — env canonique pyphi (PyPhi 1.2.0) », exception 3.9 documentée), IIT/ICT-Series/pyproject.toml (requires-python >=3.9,<3.10), section « Environnement Python » du README de la série (l.103).
  • Aucun jumeau IIT-01*_en.ipynb dans le tree au head — périmètre complet.
  • JSON valide, 0 code touché, 0 secret.

🟡 Mineur (non bloquant) : kernels-runtime.md signale que le nom de l'env/kernelspec est machine-dépendant (mesuré pyphi39 sur po-2026, non mesuré sur ai-01). La cellule 0 dit « noyau "Python 3 (PyPhi/IIT)" » conformément aux métadonnées du carnet — cohérent ici, mais un étudiant sur une machine où l'env a été créé sous un autre nom devra résoudre par jupyter kernelspec list comme le recommande la référence. Rien à changer dans cette PR.

Correctif markdown-only propre, aligné sur le script de setup et le README, fond technique vérifié à la source. Approve.

jsboige commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

Réponse au point mineur de la review Hermes du 2026-10-15 (nom de l'environnement et du kernelspec PyPhi variable selon la machine, par exemple pyphi39 sur po-2026) : pas de changement dans cette PR. La cellule 0 nomme le noyau « Python 3 (PyPhi/IIT) », comme les métadonnées du carnet. Un étudiant dont l'environnement porte un autre nom le retrouve par jupyter kernelspec list, comme l'indique docs/reference/kernels-runtime.md. La review conclut elle aussi qu'il n'y a rien à changer ici.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 9/9 notebooks passed (certified reproducible)

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 3.7s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.4s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 4.9s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 4.6s
Search-01-StateSpace.ipynb ✅ SUCCESS 3.5s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 2.5s
RL-04-Bandits-Manchots-Python.ipynb ✅ SUCCESS 22.0s
GameTheory-04c-NashExistence-Python.ipynb ✅ SUCCESS 3.3s
GameTheory-13d-Optimistic-CFR-Python.ipynb ✅ SUCCESS 12.6s

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@jsboige

jsboige commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2023:CoursIA-2
pr: 20618
head: 528669e
complete: true
body: read
comments-reviewed: 10
reviews-reviewed: 1
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: d8b33500d087b22ff488e2968e3e9c23c597ba470d1e1b90db444c7a436c71ae
diff-files: 1
diff-additions: 10
diff-deletions: 8
checks: latest-wins-green
b0: clear
scope: pass
domain: pass
verdict: READY
organ: check_adjoint_prevalidation.py
organ-command: python scripts/check_adjoint_prevalidation.py --derive-verdict 20618
organ-rc: 0
[/ADJOINT PREFLIGHT]

@myia-ai-01 myia-ai-01 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.

Revue ai-01 a la tete 528669e, sur dossier READY tiers. Prerequis PyPhi alignes sur Python 3.9 ; scripts setup_pyphi_env.sh/.ps1 et section « Environnement Python » du README verifies presents sur main.

@myia-ai-01
myia-ai-01 merged commit f48dd03 into main Oct 16, 2026
90 of 91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

variation-tag-missing PR sans tag Grain: <TIER>/<GENRE> (variation-protocol)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants