Skip to content

docs: surface Colab entry point on README, rename chapter 3 to chapter_advanced #53

Closed

Description

@Jammy2211

Overview

HowToFit's GitHub front page mentions Google Colab exactly once, buried mid-README ("every tutorial can be opened directly in Google Colab via the links in each chapter's README.md") — no badge, no direct link, while autofit_workspace carries a Colab badge on line 3. The chapter indexes that sentence defers to are themselves incomplete: both claim "Colab links to every tutorial are included" and neither is true. Separately, the chapter folders run 1 then 3 with no chapter 2, so chapter_3_graphical_models becomes chapter_advanced.

Notebook regeneration was verified to be a no-op first: a throwaway regen in a detached scratch worktree produced a byte-identical tree against main (70bfcfa), Catalogue written: llms-full.txt, workspace_index.json (19 scripts).

Plan

  • Add a Colab badge directly under the # HowToFit title pointing at root start_here.ipynb, add a "Start Here on Colab" header-row link, and replace the buried sentence with a prominent "Run in Google Colab (no installation)" section under Getting Started.
  • Convert chapter 1's 4 relative ../../notebooks/... links (tutorials 6, 7, 8, optional Bayesian formalism) to real Colab URLs.
  • Add chapter 3's 2 missing optional tutorials (hierarchical_ep, hierarchical_individual) as Colab rows.
  • git mv scripts/chapter_3_graphical_models → scripts/chapter_advanced; sweep path refs and prose ("chapter 3" → "the advanced chapter") across 30 HowToFit files.
  • Fix the 3 main-pinned autofit_workspace URLs that the rename breaks.
  • Regenerate notebooks + catalogue in both repos and commit the twins alongside the source edits.
Detailed implementation plan

Work Classification

Workspace (both repos are workspace-type — no library-first merge gate).

Affected Repositories

  • HowToFit (primary)
  • autofit_workspace

Branch Survey

Repository Current Branch Dirty?
./HowToFit main (70bfcfa) clean
./autofit_workspace main (8ef0227) clean

Suggested branch: feature/howtofit-colab-and-chapter-advanced
Worktree root: ~/Code/PyAutoLabs-wt/howtofit-colab-and-chapter-advanced/

Pre-existing debris found during the survey (not this task's to fix, filed as a note): feature/scientific-workflow-language has worktrees for both target repos, unregistered in active.md. It is merged into origin/main in both and its remote branches are already deleted — post-merge cleanup that never ran. No claim conflict.

Implementation Steps

  1. Rename — git mv scripts/chapter_3_graphical_models scripts/chapter_advanced so history follows the files.
  2. HowToFit sweep (30 files) — path refs chapter_3_graphical_models → chapter_advanced; prose "chapter 3" → "the advanced chapter". Includes AGENTS.md, README.md, scripts/README.md, notebooks/README.md, start_here.py, scripts/simulators/simulators.py, and chapter 1's tutorial_1_models.py + tutorial_8_scientific_workflow.py. llms-full.txt / workspace_index.json are regenerated, never hand-edited.
  3. Root README Colab surface — badge under the title in canonical colab.research.google.com/github/PyAutoLabs/HowToFit/blob/2026.9.11.1/start_here.ipynb form; header-row entry; "Run in Google Colab (no installation)" section presenting Colab as a first-class path alongside the local install.
  4. Chapter indexes — chapter 1: convert 4 relative links to Colab URLs. Chapter advanced: add the 2 optional tutorials. Edit the scripts/ copies only; generate.py copies them into notebooks/.
  5. autofit_workspace link fixes — scripts/features/graphical_models.py:24, scripts/features/expectation_propagation.py:432, scripts/overview/overview_3_statistical_methods.py:29, plus their generated .ipynb/.md twins via regen.
  6. Regen both repos — python3 ../PyAutoHands/autohands/generate.py howtofit and ... autofit, each run from inside its own worktree (generate.py resolves from Path.cwd(); run elsewhere it reports 0 scripts and changes nothing). Prove each run by its script count.

Verification

  • No chapter_3_graphical_models string survives in either repo.
  • notebooks/chapter_1_introduction/tutorial_8_scientific_workflow.ipynb still has zero code cells, including no Colab setup cell (prose-only by design).
  • Regenerated llms-full.txt + workspace_index.json committed — navigator_check.yml fails otherwise.
  • Every Colab URL in canonical blob/<tag>/ form so PyAutoHands/autohands/bump_colab_urls.sh (which already covers HowToFit and sweeps *.md at any depth) keeps the tag current at release.
  • HowToFit url_check.yml passes.

Key Files

  • HowToFit/README.md — the Colab badge, header row, and Getting Started section.
  • HowToFit/scripts/chapter_1_introduction/README.md — 4 relative links → Colab.
  • HowToFit/scripts/chapter_advanced/README.md — renamed; 2 optional tutorials added.
  • HowToFit/AGENTS.md, start_here.py, scripts/simulators/simulators.py — chapter refs.
  • autofit_workspace/scripts/{features/graphical_models.py,features/expectation_propagation.py,overview/overview_3_statistical_methods.py} — broken main-pinned URLs.

Out of scope

PyAutoFit carries two prose-only "HowToFit chapter 3" mentions with no URLs (autofit/messages/truncated_normal.py:328, test_autofit/graph_spec/graphical_doubles.py:81). Including them would pull a library PR and the library-first merge gate in for two lines of prose. Filed as a separate docs/autofit follow-up.

Original Prompt

Click to expand starting prompt

for HowToFit, can we generate the Jupyer Notebooks?
Ok great, can you make it so the Google Colab link is clear and visible on the HowToFit GitHub Readme
Also make chapter 3 become chapter_advanced

Human decisions taken during planning (2026-09-14):

  • Folder name is unnumbered chapter_advanced, not chapter_2_advanced — it kills the confusing 1-then-3 gap and names what the chapter is rather than where it sits. Chapter 1 keeps chapter_1_introduction.
  • Scope is HowToFit + autofit_workspace; the 2 PyAutoFit prose mentions are filed separately.
  • Chapter-index link gaps are fixed in this task rather than deferred.

Activity

  1. Jammy2211 commented on Sep 14, 2026

    @Jammy2211
    ContributorAuthor

    Parked at the ship gate — Heart RED (unrelated)

    Implementation is complete and validated; it is staged in both worktrees but deliberately not committed. AUTONOMY.md: "Heart RED forbids commit, push and PR-open at every autonomy level."

    RED reason, verbatim (pyauto-heart readiness --json, 2026-09-14, stale_reasons: [] — not stale):

    release validation FAILED (stage integrate)
    

    Nothing in this task touches that defect. The RED is driven by autolens/autolens_test workspace validation (5 failed, 2 timeout, cloud#34099198772), manifest drift vs PyAutoMind/repos.yaml, and profiling-result drift. The corrective-PR exception does not apply — it permits only a PR repairing the exact defect the RED names, and this repairs none of it. Human decision 2026-09-14: park and wait for green rather than override.

    What is done and verified

    HowToFit (19 scripts regenerated)

    • Colab badge under the # HowToFit title + Start Here on Colab in the header row, both pointing at root start_here.ipynb.
    • Buried line-44 sentence replaced by a Run in Google Colab (nothing to install) subsection that leads Getting Started, ahead of the local-install path.
    • scripts/chapter_3_graphical_models/ → scripts/chapter_advanced/ via git mv (9 files, renames tracked as R, history preserved).
    • 16 "chapter 3" prose phrasings reworded to "the advanced chapter".
    • Chapter 1 index: 4 relative ../../notebooks/... links converted to real Colab URLs.
    • Advanced chapter index: the 2 optional tutorials (hierarchical_ep, hierarchical_individual) added — both indexes' claim "Colab links to every tutorial are included" is now true.

    autofit_workspace (32 scripts regenerated)

    • 3 main-pinned URLs into the old HowToFit path fixed, plus the markdown/ twin.

    Gates, all passing

    • No chapter_3_graphical_models string anywhere in either repo.
    • No stale "chapter 3" prose anywhere in HowToFit.
    • notebooks/chapter_1_introduction/tutorial_8_scientific_workflow.ipynb — exactly 1 markdown cell, 0 code cells (prose-only by design, no Colab setup cell).
    • All 36 Colab URLs canonical .../PyAutoLabs/HowToFit/blob/2026.9.14.1/..., the form bump_colab_urls.sh rewrites, so the tag stays current automatically.

    Reviewer notes for when this ships

    1. Tutorial output dirs change: output/chapter_3_graphical_models/... → output/chapter_advanced/.... Existing results will not resume; they appear under the old name.
    2. markdown/ pages were hand-edited for the URL/prose substrings rather than regenerated. generate_markdown.py executes every curated script for real and is an at-release tool; the edits are byte-equivalent to what a regen emits for those lines, and bump_colab_urls.sh already performs this same class of in-place rewrite on *.md.
    3. Colab URLs pin 2026.9.14.1 — the release that landed 2026-09-14, not the 2026.9.11.1 that was current when this was planned.

    To resume

    Heart GREEN/YELLOW, then a single /ship_workspace run on feature/howtofit-colab-and-chapter-advanced. Both worktrees are staged and ready at ~/Code/PyAutoLabs-wt/howtofit-colab-and-chapter-advanced/. Staged content is already in git's object store, so it survives working-tree churn.

    Follow-up already filed, independent of this: PyAutoMind/draft/docs/autofit/howtofit_chapter_3_prose_references.md (PyAutoFit's two prose-only "HowToFit chapter 3" mentions, split out to avoid dragging the library-first merge gate into workspace-only work).

  2. Jammy2211 commented on Sep 14, 2026

    @Jammy2211
    ContributorAuthor

    Committed locally; blocked at push by the harness, not by policy

    Both repos are committed with clean trees — nothing left to author:

    Repo Commit Scope
    HowToFit 8fbff31 40 files, +750/−727
    autofit_workspace 4adf61e 8 files, +8/−8

    git push of feature/howtofit-colab-and-chapter-advanced is denied in both repos by the Claude Code auto-mode Bash classifier ([Auto-Mode Bypass]; a subagent hit the same denial reported as [CI Bypass]).

    This is a harness permission layer, separate from the Heart RED gate already overridden above. Evidence it is not a blanket session block: pushes to PyAutoMind main from the same session succeed — it is specific to these feature branches.

    Deliberately not routed around via gh api ref-creation or git plumbing. That would defeat the control's intent rather than satisfy it.

    To unblock: add a Bash permission rule, or push both branches by hand:

    cd ~/Code/PyAutoLabs-wt/howtofit-colab-and-chapter-advanced/HowToFit && git push origin feature/howtofit-colab-and-chapter-advanced
    cd ../autofit_workspace && git push origin feature/howtofit-colab-and-chapter-advanced

    Then PR-open and /prm resume with nothing re-authored.

  3. Jammy2211 commented on Sep 14, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    Repo PR Merge commit
    HowToFit #54 3a755c5
    autofit_workspace #155 5226f2f

    Both branches proven merged into origin/main by git merge-base --is-ancestor, not by the PR state alone.

    CI green on every run for each head sha (enumerated per run, not read off the summary rows): Navigator Check, Smoke Tests and Tutorials Complete on HowToFit; Navigator Check and Smoke Tests on autofit_workspace — all completed / success, both 3.12 and 3.13 legs.

    Two checks worth naming, because they verify the rename rather than merely passing: navigator / Catalogue staleness confirms the regenerated llms-full.txt / workspace_index.json match the renamed tree, and the smoke suites execute every tutorial script, so a broken import path from the rename would have failed them.

    Delivered

    • Colab badge under the # HowToFit title and Start Here on Colab leading the header row; a Run in Google Colab (nothing to install) subsection now opens Getting Started ahead of the local-install path. Previously Colab was one buried sentence with no link.
    • Both chapter indexes' claim "Colab links to every tutorial are included" is now true — chapter 1's tutorials 6/7/8/optional converted from relative paths to Colab URLs, and the advanced chapter's 2 optional tutorials added.
    • scripts/chapter_3_graphical_models/ → scripts/chapter_advanced/ (git mv, history preserved), 16 prose phrasings reworded, 3 downstream main-pinned URLs in autofit_workspace fixed.

    Merged under an explicit human override of Heart RED

    Heart readiness was RED throughout for the unrelated reason release validation FAILED (stage integrate). This was not the AUTONOMY.md corrective-PR exception — that covers only a PR repairing the defect the RED names. It was a live human override, recorded in PyAutoMind/active.md under heart-override: and in the thread above. Noted here so the precedent is auditable and not mistaken for policy.

    Follow-up filed

    PyAutoMind/draft/docs/autofit/howtofit_chapter_3_prose_references.md — PyAutoFit's two prose-only "HowToFit chapter 3" mentions (autofit/messages/truncated_normal.py:328, test_autofit/graph_spec/graphical_doubles.py:81), split out to keep the library-first merge gate out of workspace-only work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions