Skip to content

Polish lab notebooks: hide scaffolding, grid_sample exercise, clearer figures#2

Merged
roulbac merged 1 commit into
mainfrom
labs/lab00-polish
Jul 19, 2026
Merged

Polish lab notebooks: hide scaffolding, grid_sample exercise, clearer figures#2
roulbac merged 1 commit into
mainfrom
labs/lab00-polish

Conversation

@roulbac

@roulbac roulbac commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Mark prose/figure/checker cells hide_code=True across all lab notebooks so learners land on the exercise cells, not the scaffolding.
  • Rework lab 0 exercise 1 (bilinear_sample) around a single F.grid_sample call — notebook text, hints, and labs/solutions/lab00.py — and add a CI test pinning the solution to grid_sample(align_corners=False, padding_mode="zeros") semantics and coordinate gradients.
  • Clarify lab 0's interactive figures:
    • arrows are trimmed to stop at dot edges, so arrowheads are no longer buried under the sample dots (intro comparison, head demo, cross-attention diagram);
    • bilinear demo: the active unit cell is shaded, corner/point labels are placed outward and flipped inward near edges so nothing overflows the card at any slider position, and the table now reports the in-image weight sum (showing the fade to zero past the border) with a stable layout;
    • untrained-head demo: sample dots carry a small k index matching the fixed legend;
    • pyramid demo: per-level captions shortened so adjacent panels can no longer collide.

Test plan

  • pytest tests/test_labs.py — 14 passed, 8 skipped (GPU-only).
  • marimo export html labs/00_the_idea.py executes every cell headlessly with no errors; figures render.
  • Label-geometry sweep over the full slider ranges (bilinear demo) and all 10 seeds (head demo): no text or marker leaves the canvas.

… figures

- Mark prose/figure/checker cells hide_code=True across all lab notebooks
  so learners only see the exercise cells.
- Rework lab 0 exercise 1 around a single F.grid_sample call (notebook,
  hints, solution) and add a CI test pinning it to grid_sample semantics,
  zeros padding, and coordinate gradients.
- Clarify lab 0 interactive figures: arrows now stop at dot edges so
  arrowheads stay visible; bilinear demo shades the active cell, keeps
  every label inside the card at all slider positions, and reports the
  in-image weight sum; head demo gets a stable legend plus per-dot k
  indices; pyramid captions shortened so panels can no longer collide.
@roulbac
roulbac merged commit 7aa60d8 into main Jul 19, 2026
1 check passed
@roulbac
roulbac deleted the labs/lab00-polish branch July 19, 2026 20:04
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.

1 participant