Skip to content

Add executable quickstart notebook with Colab badges - #134

Merged
amrit110 merged 3 commits into
VectorInstitute:mainfrom
tylrcc:fix/issue-113
Nov 18, 2026
Merged

amrit110 merged 3 commits into
VectorInstitute:mainfrom
tylrcc:fix/issue-113

Conversation

@tylrcc

@tylrcc tylrcc commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Closes #113

What this adds

  • examples/quickstart.ipynb — the quickstart as a notebook, committed with its outputs kept from a full end-to-end run:
    1. pip install "tabctx[standalone,tabicl,client]"
    2. starts python -m tabctx.serve in the background (TABCTX_BACKEND=tabicl) and waits for /v1/models
    3. fits credit-g with TabctxClassifier, prints the context id, scores (0.772 in the kept run), and shows predict_proba
    4. fits TabctxRegressor on the diabetes dataset (bundled with scikit-learn, no extra download) and shows predict_quantiles as a small table (q5/q50/q95)
    5. lists the server's contexts with client.datasets(), deletes both contexts, and shows the empty list
    6. terminates the server
  • "Open in Colab" badge linking to the notebook, added to the README's Quickstart section and to docs/getting-started/quickstart.md.

Verification

The notebook was executed top to bottom locally on CPU (Python 3.12, fresh venv, weights downloaded on first server start) with zero cell errors; every output in the committed file is from that run — classification accuracy 0.772, quantile columns strictly increasing per row, both context ids listed and then deleted. The flow mirrors the README/docs quickstart exactly, so "Run all" reproduces it on a fresh Colab CPU runtime.

tylrcc and others added 3 commits November 11, 2026 22:35
examples/quickstart.ipynb runs the quickstart end to end with its
outputs kept: install tabctx[standalone,tabicl,client], start
python -m tabctx.serve in the background (TABCTX_BACKEND=tabicl),
fit credit-g with TabctxClassifier and predict, fit a regressor and
show predict_quantiles, then list and delete the contexts and stop
the server.

An Open in Colab badge linking to the notebook is added to the
README Quickstart section and to docs/getting-started/quickstart.md.
- Start the server on a free port in its own session, log to a file,
  stop waiting when it exits and show the log tail; poll via
  TabctxClient (no hard-coded URL twice); TABCTX_COMPILE=0 for a fast
  start on GPU runtimes; %pip installs into the kernel's interpreter.
- Regression uses train_test_split and checks interval coverage on
  held-out rows; quantile labels no longer truncate.
- Note that estimators re-fit a deleted context on their next predict.
- Re-executed against tabctx 0.21.0; execution timestamps dropped.
- ruff-format the notebook and run code checks on .ipynb changes.
- README links the Colab notebook by absolute URL (PyPI); docs say
  what the notebook covers.
- python-multipart floor 0.0.13 (the server imports python_multipart).
- CHANGELOG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.72%. Comparing base (46e8593) to head (26453f9).

❌ Your changes status has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #134      +/-   ##
==========================================
+ Coverage   87.71%   87.72%   +0.01%     
==========================================
  Files          67       67              
  Lines        6723     6723              
==========================================
+ Hits         5897     5898       +1     
+ Misses        826      825       -1     
Flag Coverage Δ
integration 32.20% <ø> (ø)
unit 87.56% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@amrit110

Copy link
Copy Markdown
Member

Thanks @tylrcc, the runnable quickstart notebook with Colab badges is a great addition! I pushed a few review fixes on top (server startup handling, formatting, docs wording) before merging.

@amrit110
amrit110 merged commit e1490e1 into VectorInstitute:main Nov 18, 2026
6 checks passed
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.

A Colab quickstart notebook

3 participants