Skip to content

docs: complete zero-setup Colab tutorial notebook - #226

Merged
himanshu231204 merged 5 commits into
OpenAgentHQ:mainfrom
Nitjsefnie-OSC:docs/colab-tutorial-notebook
Jul 23, 2026
Merged

docs: complete zero-setup Colab tutorial notebook#226
himanshu231204 merged 5 commits into
OpenAgentHQ:mainfrom
Nitjsefnie-OSC:docs/colab-tutorial-notebook

Conversation

@Nitjsefnie

Copy link
Copy Markdown
Contributor

Part of #188 — the notebook half you asked for on #219 (the companion video remains open for whoever takes it).

examples/openagent_eval_colab_tutorial.ipynb: 69 cells (33 code + 36 markdown), shipped with executed outputs like the existing examples. Executes end-to-end with ZERO API keys via the built-in mock provider stack (llm.provider: mock + retriever.provider: mock), covering the issue's full section list: install → terminal basics → init --no-interactive → sample data → run → corpus audit → diagnose → synth → compare → SDK → CI/CD gating → custom metrics → troubleshooting → next steps, plus an optional real-keys section (getpass / Colab Secrets, never hardcoded).

Verified the way a Colab user experiences it: fresh venv, pip install openagent-eval==0.4.6 from PyPI (not the repo checkout), jupyter nbconvert --execute → 33/33 code cells clean, re-executed with all provider keys scrubbed to match a clean Colab runtime.

Three honest notes baked into the notebook rather than papered over: the install cell also installs pytest (0.4.6's CLI import-crashes without it — filing that as an issue), the CI/CD section teaches gating via the working SDK threshold path because oaeval test is non-functional in 0.4.6 (also being filed), and synth under the mock provider honestly yields 0 cases (real synthesis needs a real key). Also: the issue body's transcribed API signatures have drifted from the code (BaseMetric.evaluate(**kwargs), positional audit/diagnose paths, async Engine.run) — the notebook uses the verified real surfaces.

Deliberately did NOT touch examples/README.md / root README badge (shared-file conflict risk while your merge queue is hot) — happy to add the index line + badge as a follow-up commit here if you want them in this PR.

Generated by Claude Fable 5 (brief, review), Claude Opus 4.8 (implementation)

Add examples/openagent_eval_colab_tutorial.ipynb — a complete, beginner-friendly
Google Colab walkthrough for OpenAgent Eval that runs end-to-end with no API keys
by using the built-in `mock` LLM/retriever providers.

Covers: installation, terminal basics for notebook users, the oaeval CLI, config
init, sample data, running an evaluation, corpus audit, failure diagnosis,
synthetic data, experiment comparison, the Python SDK, CI/CD gating, custom
metrics, troubleshooting, and clearly-marked optional cells for real API keys
(getpass / env vars, guarded to skip gracefully). Ships with executed outputs.

Addresses OpenAgentHQ#188 (notebook deliverable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@himanshu231204

Copy link
Copy Markdown
Member

@Nitjsefnie update the notebook with the new release v.0.4.7

@Nitjsefnie

Copy link
Copy Markdown
Contributor Author

Held the 0.4.7 notebook update — the 0.4.7 release artifacts are broken (wheel+sdist missing the whole openagent_eval.reports subpackage, every oaeval command dies at import; full evidence in the issue I just filed). Pinning the notebook to 0.4.7 would crash all ~15 CLI cells, so it stays on 0.4.6 (where everything executes) until a rebuilt release is up — then I'll re-pin, re-execute headless, and also re-test whether the #227 pytest workaround can come out.

@himanshu231204

Copy link
Copy Markdown
Member

@Nitjsefnie update the notebook with the new release v.0.4.8

Re-pin the Colab tutorial to the freshly published 0.4.8 and re-execute
every cell headless against it.

- Version banners now show v0.4.8 (regenerated `oaeval --version`,
  `doctor`, `run`, `audit` outputs); install note bumped 0.4.6 -> 0.4.8.
- 0.4.8 restores the `openagent_eval.reports` subpackage that the broken
  0.4.7 wheel dropped, so `oaeval` is usable again from a clean install.
- The `pytest` install workaround is kept: `oaeval` still imports pytest
  at start-up on a clean install, so it remains required for the CLI.
- CI/CD section keeps the SDK/programmatic threshold demonstration: the
  `oaeval test` gate still reports every metric as "not found in results"
  on 0.4.8, so the live command is not yet taught as a passing example.

All non-optional cells execute cleanly; optional real-provider cells stay
guarded no-ops with no API key. Paths normalized to /content.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Nitjsefnie

Copy link
Copy Markdown
Contributor Author

Updated to 0.4.8 in 8666c9e and re-executed the whole notebook headless against the PyPI release — all 26 code cells clean.

Release re-test results, since they matter for your notes:

@himanshu231204

Copy link
Copy Markdown
Member

@Nitjsefnie update all the previous example/notebook . and also add it to doc so that github pages is up to date

…he docs site

Update the two pre-existing example notebooks to openagent-eval 0.4.8 and
add the example tutorials (Colab, RAG, corpus) to the MkDocs site so GitHub
Pages stays current.

examples/corpus_and_related_modules.ipynb:
- bump version strings and the install pin to 0.4.8
- select a Groq LLM when GROQ_API_KEY is set, otherwise skip the
  LLM-as-judge cells (contradiction detection + synthesis) so the notebook
  runs cleanly offline; nbconvert-clean against 0.4.8

examples/rag_evaluation_tutorial.ipynb:
- install pytest alongside openagent-eval (required by the CLI) and quiet
  the install; re-executed against 0.4.8 with refreshed outputs

docs: add examples/colab.md, examples/rag.md and examples/corpus.md, turn
examples/index.md into an overview of all three notebooks (with an
open-in-Colab badge), and add the nav entries in mkdocs.yml.
mkdocs build --strict passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Nitjsefnie

Copy link
Copy Markdown
Contributor Author

All done in d72dd58:

  • Both older notebooks refreshed to 0.4.8 and executed headless clean. corpus_and_related_modules: was pinned to 0.4.4 and its LLM cells crashed with NameError without a Groq key — now version-correct, with the four LLM-as-judge cells key-guarded like the Colab tutorial (the mock provider genuinely can't drive the synthesis parser, so guarding beats mocking there); non-LLM detectors run offline. rag_evaluation_tutorial: install cell now includes pytest (the cli: oaeval crashes on a clean pip install — pytest imported at load but not a runtime dependency #227 workaround — its doctor subprocess dies without it on a clean env) and outputs re-executed fresh; only that one source cell changed.
  • Docs/Pages wired: new docs/examples/colab.md (open-in-Colab badge + raw download), rag.md, corpus.md, the examples index rewritten to cover all three, and the mkdocs nav updated. mkdocs build --strict exit 0.

Two heads-ups: docs/examples.md and docs/examples/index.md both resolve to /examples/ — a pre-existing URL collision I didn't touch (4 inbound links target the former); and the docs CI step runs with continue-on-error: true, so the local --strict pass is the real gate. Once this merges I'll start the #239 redesign on top.

@himanshu231204

Copy link
Copy Markdown
Member

All done in d72dd58:

  • Both older notebooks refreshed to 0.4.8 and executed headless clean. corpus_and_related_modules: was pinned to 0.4.4 and its LLM cells crashed with NameError without a Groq key — now version-correct, with the four LLM-as-judge cells key-guarded like the Colab tutorial (the mock provider genuinely can't drive the synthesis parser, so guarding beats mocking there); non-LLM detectors run offline. rag_evaluation_tutorial: install cell now includes pytest (the cli: oaeval crashes on a clean pip install — pytest imported at load but not a runtime dependency #227 workaround — its doctor subprocess dies without it on a clean env) and outputs re-executed fresh; only that one source cell changed.
  • Docs/Pages wired: new docs/examples/colab.md (open-in-Colab badge + raw download), rag.md, corpus.md, the examples index rewritten to cover all three, and the mkdocs nav updated. mkdocs build --strict exit 0.

Two heads-ups: docs/examples.md and docs/examples/index.md both resolve to /examples/ — a pre-existing URL collision I didn't touch (4 inbound links target the former); and the docs CI step runs with continue-on-error: true, so the local --strict pass is the real gate. Once this merges I'll start the #239 redesign on top.

ok wait for a min to workflow completed

@himanshu231204
himanshu231204 merged commit 80b6a0a into OpenAgentHQ:main Jul 23, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @Nitjsefnie!

Your pull request has been successfully merged into main. 🚀

Thank you for contributing to OpenAgentHQ and helping improve the project.

We truly appreciate your contribution and hope to see you back with more amazing PRs!

Happy Open Sourcing! ❤️

@himanshu231204

Copy link
Copy Markdown
Member

good to go with #239

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