Skip to content

enrich(mgs,#1203): add executable composition exercises - #15404

Merged
myia-ai-01 merged 3 commits into
mainfrom
feature/1203-mgs20-exercises
Sep 9, 2026
Merged

myia-ai-01 merged 3 commits into
mainfrom
feature/1203-mgs20-exercises

Conversation

@jsboige

@jsboige jsboige commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Grain: MED/notebook-python — lane myia-po-2025:CoursIA — prev: DEEP/lean #15395

Summary

  • convert the three markdown-only assignments into instruction/code-stub pairs
  • remove exposed solution and near-solution bodies while preserving the existing guided examples
  • expose the integer generation index through ctx["generation"] so the Islands exercise can implement periodic migration without changing the DSL's fractional gen contract
  • eliminate the Matplotlib tight_layout warning at its source and commit freshly executed outputs

Pedagogical result

  • exercises detected: 3/3 (previously 0/3)
  • executable code cells: 13/13 with execution counts and outputs
  • intentional error patterns: 0
  • consecutive code-cell runs: 0
  • guided examples remain intact; only solution material embedded in the three assignment markdown sections was replaced by executable C.1 stubs

Execution evidence

python scripts/notebook_tools/notebook_tools.py execute MyIA.AI.Notebooks/Search/Part4-Metaheuristics/MGS-20-Langage-de-Composition.ipynb
[MGS-20-Langage-de-Composition.ipynb] (kernel: python3)
  [+] SUCCESS
Success: 1
Failed: 0
Total time: 31.8s
python scripts/notebook_tools/validate_pr_notebooks.py origin/main
Notebook PR Validation: 1/1 passed
Total code cells checked: 13
PASS ...MGS-20-Langage-de-Composition.ipynb (13 cells)
All notebooks passed validation.
Verdict: EXEC_PROVED
python scripts/notebook_tools/count_exercises.py <notebook>
Total exercises: 3
Conforming: 1
Sub-threshold: 0

python scripts/notebook_tools/scan_cell_ordering.py <notebook>
Scanned 1 notebook(s): 1 clean, 0 finding(s).

python scripts/notebook_tools/scan_enrich_quality.py <notebook> --base origin/main:<notebook>
Scanned 1 notebook(s): 1 clean, 0 finding(s).

python scripts/notebook_tools/detect_consecutive_code_cells.py <notebook>
Run >= 2: 0

python scripts/notebook_tools/check_output_failure_text.py origin/main
1 changed notebooks | 0 regressed

git diff --check origin/main..HEAD
# success

PNG sync (dispatch ai-01, commit a6e3e00)

MGS-20-top5-courbes.png avait été restauré byte-for-byte pendant que sa cellule génératrice (19) change dans cette PR (figsize 9×5.5 → 11×6, tight_layout retiré au profit de bbox_inches="tight") — rendu périmé. Ré-exécution honnête du notebook (31.8 s, 1/1 SUCCESS) :

  • MGS-20-top5-courbes.png régénéré (89074 → 185522 bytes) : le fichier reflète maintenant la figure du HEAD.
  • MGS-20-rastrigin-paysage.png / MGS-20-main-vs-found.png restaurés depuis origin/main : leurs cellules génératrices (3/21) sont inchangées dans cette PR, les rendus d'origine restent cohérents.
  • Notebook : métadonnées papermill fraîches + timing cellule 17 actualisé (10.5 s → 7.3 s) ; aucune source modifiée.

See #1203

🤖 Generated with Claude Code

jsboige and others added 2 commits September 9, 2026 17:29
Convert the three markdown-only assignments into instruction/stub pairs, remove exposed solution bodies, and preserve end-to-end execution with real outputs.

Co-Authored-By: Claude-Code <noreply@anthropic.com>
Expose the integer generation index for Islands and update its exercise hints. Remove the Matplotlib tight_layout warning by saving the wider figure with a tight bounding box.

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

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 13
  • 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 9, 2026

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 9, 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.2s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.3s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 4.4s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 4.3s
Search-01-StateSpace.ipynb ✅ SUCCESS 3.6s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 2.4s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 17.3s
GameTheory-04c-NashExistence-Python.ipynb ✅ SUCCESS 2.4s

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

…e cell

dispatch ai-01 17:54Z : le fichier MGS-20-top5-courbes.png avait ete
restaure byte-for-byte depuis origin/main alors que sa cellule
generatrice (cell 19) change dans la PR (figsize 9x5.5 -> 11x6,
tight_layout -> savefig bbox_inches="tight"). Rendus incoherents.

Re-run honnete du notebook (notebook_tools execute, 31.8s, 1/1 SUCCESS) :
- top5-courbes.png regenere (89074 -> 185522 bytes) : le fichier
  reflete maintenant la figure du code HEAD
- rastrigin-paysage.png et main-vs-found.png restaures depuis
  origin/main : leurs cellules generatrices (3/21) sont inchangees
  dans cette PR, le rendu d'origine est coherent
- notebook : metadonnees papermill fraiches + timing cell 17 actualise
  (10.5s -> 7.3s) ; aucune source modifiee

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

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

Review sur le SHA a6e3e0001ba3fbaaf0c62a1bd31360c433595c44.

Le diff réel reste borné au notebook MGS-20 et à sa figure régénérée. Les trois exercices sont désormais des paires consigne/stub C.1 exécutables, sans solution exposée ; les 13 cellules code portent un execution_count et des sorties cohérentes, et le contrôle d'exercices confirme 3 exercices avec 0 notebook sous seuil. L'ajout de ctx["generation"] préserve le contrat fractionnaire de gen tout en exposant l'indice entier nécessaire à Islands.

La figure panoramique a été relue globalement puis panneau par panneau : cinq tracés complets, titres, axes, courbes et légendes lisibles, sans rognage ni panneau cassé. Le log complet du PR gate rouge ne révèle qu'un DWELL immature (8/120 min), sans autre défaut ; le merge reste donc conditionné à une nouvelle agrégation verte après maturité.

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

APPROVED — SHA a6e3e0001ba3fbaaf0c62a1bd31360c433595c44, verdict final post-maturité.

La condition DWELL est désormais satisfaite : le PR gate a été ré-agrégé en place après maturité et a terminé SUCCESS à 2026-09-09T21:35:16Z. B.0 relu intégralement au SHA courant : aucun nit non levé, aucun thread, aucun CHANGES_REQUESTED. Le diff reste byte-identique au périmètre audité (notebook MGS-20 + PNG synchronisé). Vérification directe du blob : 13/13 cellules code exécutées avec sorties, zéro erreur, zéro pattern C.1; PNG valide 3494×600 et 185522 octets. Aucun des deux chemins n’a été modifié sur main depuis la base de la PR. Verdict sans réserve.

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