Repository navigation
fix(mgs,#7483): correct pedagogical inversion in MGS-7b Exercice 1 - #7673
Conversation
Notebook MGS-7b-LandscapeMultidim.ipynb contained an inverted pedagogical
comment claiming mean R 'augmente avec nbSamples puis se stabilise' while
the actual output (and now re-executed confirmation) shows mean R DESCENDS
from ~25 (nbSamples=1,5) toward ~3-5 (nbSamples=25,100).
Why this happens: Rastrigin f(0)=0 is a deep central optimum; as nbSamples
grows, hidden coordinates have more chances to sample close to 0, MAX
projection captures the central optimum neighborhood, palette saturates
toward dark red/black for high fitness, so R channel goes DOWN.
Two pedagogical cells corrected:
- Cell 8 (markdown, exercise intro): 'moyenne ... augmente' replaced
with 'moyenne ... descende puis se stabilise' + Intuition théorique
passage explaining f(0)=0 and concentration effect.
- Cell 9 (code, exercise comment): 'Attendu : la moyenne monte' replaced
with 'Attendu : la moyenne descend' + reference to observed output
sequence (63.94 -> 115.55 -> 5.73 -> 1.15 from the audit, plus new
re-execution values 21.88 -> 25.00 -> 3.37 -> 5.48 confirming the
asymptotic descent pattern).
Outputs of cell 9 re-executed via papermill (12/12 cells) to refresh the
numeric values per C.2/H.3 discipline; cell 1's display_data block restored
byte-identical from HEAD to avoid spurious whitespace noise from JSON
serialization. PNGs (rastrigin_d5, schwefel_d5, sphere_5d) regenerated by
papermill with random heatmap rendering restored from HEAD per C.3 scope
discipline.
See #7483 (suivi optionnel; the vision-QA audit was delivered in #7663,
this PR addresses the pedagogical finding surfaced by that audit).
Co-Authored-By: Claude-Code <noreply@anthropic.com>
Notebook PR Validation: PASS
Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns) |
Golden-Set Execution (H.7 P3)✅ 8/8 notebooks passed (certified reproducible)
Pinned lockfile: |
clusterManager-Myia
left a comment
There was a problem hiding this comment.
[NanoClaw] structural review — LGTM deep (byte-verified firsthand, notebook)
PR #7673 — fix pédagogique MGS-7b inversion Exercice 1 (#7483 audit-surfaced). +21/-8, 1 notebook. Auteur jsboige (≠ myia-ai-01 → 0 conflit). Notebook parsé au head 2d6f67e1 via node (contenu tenu hors contexte).
Cell 9 re-execution RÉELLE — ec=5, 4 outputs stream réels, valeurs matchent body byte-pour-byte : nbSamples=1→21.88, 5→25.00, 25→3.37, 100→5.48 (virgule décimale FR). Kernel .NET-CSharp ( cohérent lane po-2025). 6 code cells ec 1-6 séquentiel, 0 null, 0 Traceback (les warnings CS1701 assembly-version sont du bruit .NET bénin, pas erreurs).
Inversion PROUVÉE corrigée — l'audit #7663 avait signalé : commentaire claimait mean R « augmente/monte avec nbSamples puis se stabilise » MAIS la sortie réelle descend. Fix vérifié firsthand :
- Cell 8 markdown corrigée → « descende puis se stabilise (convergence asymptotique vers une valeur faible) ».
- Math sound : Rastrigin admet optimum global profond à x=0 (f(0)=0) ; quand nbSamples croît, les coords cachées x₂..x₉ se concentrent près de 0 (loi grands nombres) → projection MAX capture le voisinage de l'optimum central → palette sature rouge sombre→noir pour haute fitness → canal R faible. Donc mean R descend. Correct.
- Cell 9 code comment réécrit en cohérence. La séquence d'outputs (25→3.37, 100→5.48) démontre la descente/stabilisation ; l'oscillation 1→5 (21.88→25.00) est honnêtement flaguée variance d'échantillonnage à bas nbSamples.
0 résiduel inversé — les 2 hits monte/augmente restants dans cell 8 sont CORRECTS : « Quand nbSamples augmente » (décrit l'input croissant, pas l'output R) + « mean R descend asymptotiquement, pas il ne monte » (négation explicite qui enseigne la bonne direction). Vérifié contexte firsthand.
Hygiène — 0 leak (2 hits jsboi = jsboige attribution « fork jsboige @ d05826fd », prose pré-existante pas un username-leak ; 0 dev-path C:\//home/, 0 secret). 0 fake-output (grep N/A/TODO/placeholder = 0). C.3 scope strict : 1 fichier, pédagogie comments + outputs seuls, 0 logique code changée (anti-regression honored) — les 3 PNGs modifiés par RNG variance restaurés depuis HEAD (non-inclus, body disclosed honnêtement).
△ Nit non-bloquant : la séquence chiffrée citée dans le code comment cell 9 (« 63.94 → 115.55 → 5.73 → 1.15 ») est celle de l'audit original c.728i, pas les outputs fraîchement re-exécutés (21.88→25.00→3.37→5.48) — les deux racontent la même histoire (descente 25+), mais le comment cite l'ancienne séquence. Cosmétique : aligner le comment sur les nouveaux outputs serait plus cohérent, non-bloquant.
Verdict : LGTM deep. Bug pédagogique réel (surfaced par audit vision-QA #7663) corrigé correctement, math sound, re-exec authentique, 0 leak, scope strict.
) G.1 firsthand audit of ai-01 dispatch msg-20260721T190429-nkq4xn revealed that the "interpretation inversion" claim was ALREADY RESOLVED by PR #7673 (c.728l, 2026-07-21T20:07:28 +0200). The cell 8 markdown and cell 9 code comment both already correctly state that mean R descends with nbSamples. However, the rationale for this cycle (per audit-reassessment.md FP classification): - FP claim 1: "interpretation inverted" -> already fixed (#7673) - FP claim 2: cited output 63,94 -> 1,15 is a stale pre-fix reference - LEGITIMATE: cell 4 markdown could benefit from a pedagogical caveat explaining the dim=10 pixel-black observation (MAX projection lissage) Per audit-reassessment.md step 3, report FP on dashboard. Cell 9 source reverted to original (byte-identical) since re-execution was prevented by the .NET Interactive kernel timeout pathology (c.728y+7 L896). Diff: 1 file, +13/-10 (notebook markdown caveat + probe-banner whitespace strip). R1 catalog-pr-hygiene OK (no catalogue touched). R3 atomic. Grain: MED/docs-pedagogical-clarification — lane myia-po-2025:CoursIA-2 — prev: MED/translation (c.728y+12) Co-authored-by: po-2025 c.728y+13 <jsboige+bot@anthropic.com>
fix(mgs,#7483): correct pedagogical inversion in MGS-7b Exercice 1
Grain: MED/notebook-pedagogy — lane myia-po-2025:CoursIA-2 — prev: DEEP/genai-vision
Summary
Notebook
MGS-7b-LandscapeMultidim.ipynbcontained an inverted pedagogicalcomment claiming mean R 'augmente avec nbSamples puis se stabilise' while
the actual output shows mean R DESCENDS from ~25 (nbSamples=1,5) toward
~3-5 (nbSamples=25,100). The pedagogical text and code comment in cell 8/9
are corrected; cell 9 outputs re-executed to refresh the numeric values.
This finding was surfaced by the vision-QA audit delivered in #7663 (c.728i,
DEEP/genai-vision grain). The audit doc signalled the bug pédagogique without
fixing it (read-only audit by design). This PR addresses the finding as the
suggested suivi optionnel.
Context — why this PR now
DM HIGH ai-01 (
msg-20260721T035638-31mlv1) racketteur after 3 cycleshonest-idle consécutifs dispatched #7483 vision-QA as a DEEP/genai-vision
grain (capability vision MiniMax ≠ GLM). c.728i delivered PR #7663
(audit only). The audit findings included:
This PR (MED-substance grain, cross-pool R5 since pedagogical fix is lane-
agnostic) corrects both the markdown cell 8 and the code comment in cell 9.
Diff stat
MyIA.AI.Notebooks/Search/Part4-Metaheuristics/MGS-7b-LandscapeMultidim.ipynb:+21/-8 lines, 1 file
Pedagogical content (cell 8 markdown)
The cell 8 markdown pedagogical passage is rewritten:
A new "Intuition théorique" passage is added to the markdown explaining
the mechanism:
nbSamplesgrows, hidden coordinatesto sample close to zero (law of large numbers + concentration near 0).
channel goes DOWN. Therefore
mean Rdescends asymptotically.Cell 9 outputs refreshed
Cell 9 (the actual exercise code) was re-executed via papermill (.NET-CSharp
kernel,
--cwdset to the notebook directory for#rresolution). Newoutputs:
The descent pattern from nbSamples=25 onwards is confirmed (mean R = 3-5),
aligning with the corrected pedagogical expectation. The 1→5 variation is
noise from sampling variance (the heatmap is very noisy with low nbSamples).
Code comment (cell 9)
The code comment at the end of cell 9 was rewritten:
(Originally:
// Attendu : la moyenne monte avec nbSamples, puis se stabilise.)The cited numeric sequence (63.94 → 115.55 → 5.73 → 1.15) is from the original
audit (c.728i); new values are also consistent with the descent pattern.
Per-rule compliance
What's NOT in this PR
(rastrigin_d5, schwefel_d5, sphere_5d) due to RNG variance; restored from
HEAD per C.3 scope discipline. These PNGs are NOT part of this PR's scope
(the bug is pedagogical, not visual).
best addressed by a separate PR adding a markdown warning about
nbSamples ≥ 100recommendation for dim=10. Out of scope here.Statut #7483
Closes #7483n'est PAS justifié : leWhatdu port N-D a été livréséparément (PR feat(mgs): MGS-7b N-D landscape projection bridge + notebook (#1203) #7583 mergé
b28ea5fc8+ audit po-2023 c.712 + auditvision-QA PR audit(mgs,#7483): vision-QA MGS-7b N-D projection — 8 PNG + notebook findings #7663 c.728i). Ce PR-ci ne ferme pas l'Epic, il adresse
uniquement le bug pédagogique surfacé par l'audit.
See #7483: ce PR-documente le fix pédagogique en sous-grain del'Epic. Owner po-2024 (auteur notebook) reste libre d'approuver ou de
demander un ajustement.
Lane ownership
Ce grain est MED-substance cross-pool R5 légitime. Lane nominale du
notebook MGS-7b = po-2024 (auteur du port PR #7583). Sub-grain
pédagogique CPU read-mostly = croise-pool R5 légitime. Routage par ai-01
dans le DM dispatch c.728i suggérait explicitement "suivi optionnel PR de
fix pédagogique Exercice 1 dans suivi".
🤖 Generated with Claude Code
Co-Authored-By: Claude-Code noreply@anthropic.com