Repository navigation
Add executable quickstart notebook with Colab badges - #134
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. ❌ 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@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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. |
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.
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:pip install "tabctx[standalone,tabicl,client]"python -m tabctx.servein the background (TABCTX_BACKEND=tabicl) and waits for/v1/modelsTabctxClassifier, prints the context id, scores (0.772 in the kept run), and showspredict_probaTabctxRegressoron the diabetes dataset (bundled with scikit-learn, no extra download) and showspredict_quantilesas a small table (q5/q50/q95)client.datasets(), deletes both contexts, and shows the empty listdocs/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.