Repository navigation
Make the experimental Colab notebook a Gemini sandbox - #46
Merged
Merged
Conversation
Keep only the two setup cells — install the pinned assistant stack, print the Gemini sidebar context — and drop the guided tour (data inspection, model and likelihood, the small fit, the results download). A short closing cell says the notebook is now the reader's sandbox for working in PyAutoFit with Gemini. Edited in scripts/experimental_colab.py and regenerated with `python -m autoassistant.to_notebook`; README's Colab section follows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FS8ubAQEXFKyv4GxDaSpra
The sidebar only ever sees what the notebook prints, so pick that payload for a sandbox rather than the deleted guided tour: - add BYOL mode and a "3. Your sandbox" section built around it — paste your own likelihood, numerics untouched, nothing fitted before your go-ahead; - add the skills a sandbox session reaches for next: configure_search, run_search, plot_fit, debug_fit_failure; - send an excerpt of AGENTS.md (preamble, safety invariants, three-layer model, domain adaptation) instead of the whole file — the omitted sections direct an agent that can read files and run commands, which the sidebar cannot; - add show(<path>) so any other assistant file can be printed and pasted when it is needed, rather than fixing everything in the one paste. Context goes from ~32 KB to ~58 KB (~14k tokens), all of it applicable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FS8ubAQEXFKyv4GxDaSpra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns
notebooks/experimental_colab.ipynbfrom a six-step guided tour into a two-cell setup plus a sandbox, and retargets the context it hands the Gemini sidebar.Trim to a sandbox
Everything from
## 3. Inspect the bundled simulated dataonwards is gone — data inspection, the model/likelihood check, the small fit, the results zip. What remains: install the pinned assistant stack, print the sidebar context, then a## 3. Your sandboxsection where the reader writes their own cells.Retarget the context
The sidebar only ever sees what the notebook prints, so the payload is now chosen for a sandbox rather than for the deleted tour:
modes/byol.md) plus a sandbox section built around it — paste your own likelihood, numerics untouched, nothing fitted before your go-ahead.af_configure_search,af_run_search,af_plot_fit,af_debug_fit_failure, alongside the existingaf_compose_modelandaf_wrap_likelihood.AGENTS.md(preamble, safety invariants, three-layer model, domain adaptation — 6.2 KB of 15.8) instead of the whole file. The omitted sections direct an agent that can read files and run commands, which the sidebar cannot; pasting them invites it to propose workflows that cannot run.show(<path>)prints any other assistant file on demand, so the fixed paste does not have to be exhaustive. It runsshow("skills/README.md")on execution, giving a one-line index of every skill.Context goes from ~32 KB to ~58 KB (~14k tokens), all of it applicable.
Notes
scripts/experimental_colab.pyis the source; the.ipynbis regenerated withpython -m autoassistant.to_notebookand was byte-identical to the converter's output before this change, so the pair stays in sync.agents_excerpt()selects sections by heading prefix and raises if one stops matching uniquely, so an upstream rename fails loudly rather than silently pasting nothing.ASSISTANT_REF = 2026.9.15.1, so the context files are read from that tag, not frommain. All nine paths exist there and the three heading prefixes each resolve uniquely in the tag'sAGENTS.md(byte-identical to this branch's).🤖 Generated with Claude Code
https://claude.ai/code/session_01FS8ubAQEXFKyv4GxDaSpra
Generated by Claude Code