fix(docs): install commands named SDK extras removed in 0.10.0 (backend#1858) - #113
Conversation
…nd#1858) `tools-help/tracebloc.mdx` documented `tracebloc[boosting]` and `tracebloc[survival]`. Both were removed in 0.10.0, eight published releases ago. `pip` does not fail on an unknown extra — it warns, installs the core SDK only, and exits 0 — so a reader following the page got a core-only install and discovered it later as an ImportError, far from the command that caused it. Replace them with the per-library extras (`xgboost` / `catboost` / `lightgbm`, `lifelines` / `scikit-survival`) and note that the Hugging Face stack now ships inside `[pytorch]`. Also bump the `>=0.8.1` floor to `>=0.18.1` in both pages that carry it. The stale floor is what made this silent: it floats forward to a release that no longer has the extras, while still being satisfiable by 0.8.1 on an unsupported Python. `join-use-case/start-training.mdx` told readers to create a Python 3.9 environment, on which the old floor quietly resolves to 0.8.1 instead of erroring; with the current floor pip now fails loudly, and the page asks for 3.12. Add `scripts/check-sdk-extras.py` plus a workflow to run it: every documented `tracebloc[...]` spec must name an extra that exists in the release its floor resolves to. Verified it fails on the pre-fix content and passes on the fixed tree. Wired into `make check-all`, and the Makefile comment that claimed no content gate exists is updated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
saadqbal
left a comment
There was a problem hiding this comment.
Verified every extra against PyPI Provides-Extra: [boosting]/[survival]/[huggingface] are gone as of 0.10.0, and the new [sklearn] (pulls catboost/lightgbm/xgboost), [xgboost], [lifelines,scikit-survival], [pytorch] (pulls transformers+peft) all resolve on 0.18.1. Floors and Python 3.11/3.12 requirement are right, and the specs are consistent across both pages. Nice, thorough fix with a real guard.
One nit inline: the new Python note describes the old floor's behavior.
…error, not silent 0.8.1 fallback); addresses @saadqbal review, docs#113.
shujaatTracebloc
left a comment
There was a problem hiding this comment.
Verified against live PyPI rather than just reading the diff:
tracebloclatest is 0.18.1 andrequires_pythonis>=3.11,<3.13— the new "Requires Python 3.11 or 3.12" line and thepython=3.12conda bump are both correct.- Published extras on 0.18.1 are exactly
all, catboost, dev, lifelines, lightgbm, pytorch, scikit-survival, sklearn, tensorflow, xgboost. Every extra the docs now name exists;boosting/survival/huggingfaceare genuinely gone. - Checked the replacement guidance the script can't validate:
[sklearn]inpyproject.tomlreally does pullcatboost,lightgbmandxgboost, so "incl. XGBoost / CatBoost / LightGBM" is accurate. - Confirmed the new workflow actually executed here (
SDK install extras [pull_request] -> success) — it is not a gate that silently no-ops on the PR that introduces it.
The framing is the valuable part: pip warning-and-exiting-0 on an unknown extra is exactly why this rotted for eight releases, and the weekly schedule: trigger is the right call given a floating >= floor re-points itself without the docs changing.
Three non-blocking nits for later, all outside backend#1858's scope:
parse_versionmaps0.19.0rc1to(0,19,0), so a prerelease could tie/win inmax()even though pip excludes prereleases by default. Same class:meta["releases"]includes yanked versions.~=is accepted bySPEC_REbut resolved as if it were>=, so~=0.18.1would wrongly resolve past0.19.x. Nothing in the docs uses it today.extras_cacheis annotateddict[str, set[str]]but storesNoneon fetch failure. Handled correctly by the caller, just an inaccurate annotation.
LGTM.
saadqbal
left a comment
There was a problem hiding this comment.
Reword nails it — clears my earlier comment. With the floor at >=0.18.1 (only 0.18.1 resolves, Requires-Python >=3.11,<3.13), an old Python gets a loud No matching distribution found, not a 0.8.1 fallback; that fallback was only ever possible under the old >=0.8.1 floor. Checked against PyPI: extras all valid, boosting/survival/huggingface gone since 0.10.0, both files consistent on Python 3.11/3.12. 👍
Fixes tracebloc/backend#1858
The bug
tools-help/tracebloc.mdxdocumented two install commands whose extras do not exist:pipdoes not fail on an unknown extra. It warns, installs the base package, and exits 0 — so the reader gets a core-only SDK and finds out later as anImportError, far from the command that caused it.Reproduced on Python 3.12, against the real package
No
xgboost, nocatboost, nolightgbm. Same for[survival]:The removal happened in 0.10.0, not 0.14.0
Read from published
Provides-Extraon PyPI:So
boosting,survivalandhuggingfaceall disappeared at 0.10.0. Eight published releases have shipped without them.A second, related defect found while verifying
join-use-case/start-training.mdxtold readers to create a Python 3.9 environment. The SDK has required>=3.11,<3.13since 0.10.0. Combined with the stale>=0.8.1floor, that does not error — it silently installs the ancient 0.8.1:The stale floor is the root cause of both symptoms. With the corrected floor, the same unsupported interpreter now fails loudly instead:
What changed
tools-help/tracebloc.mdx—[boosting]/[survival]replaced with the per-library extras; added a note that the umbrellas (and[huggingface]) were removed in 0.10.0 and that pip fails silently on a bad extra; stated the Python requirement.join-use-case/start-training.mdx—python=3.9→python=3.12; version floors bumped.>=0.8.1floor in the repo →>=0.18.1(10 specs across the two pages — these were the only files withtracebloc[...]lines).scripts/check-sdk-extras.py+.github/workflows/sdk-extras-check.yml— the regression guard.Every replacement extra was verified to resolve and pull the right libraries:
The guard, and proof it catches this
Mintlify validates links and MDX; a fenced code block is opaque to it. The new check extracts every
tracebloc[...]spec, resolves the version its floor selects, and asserts each extra is in that release'sProvides-Extra.Against the pre-fix content — it fails, naming both bugs:
Against the fixed tree — green:
It also runs weekly on cron, because these docs can rot without the docs changing — a floating
>=floor re-points at each new release.Test plan / caveats
make check-sdk-extras— green (above).make check(mint broken-links) — not run: the Mintlify CLI is not installed in this environment. No links were added or changed except one intra-page<Note>, so link risk is low, but this check is genuinely unrun on my side and CI/preview should confirm it.ImportErroritself, which needs a real model-upload flow against a running backend. What is directly shown is that pip exits 0 with the boosting libraries absent.Note
Low Risk
Documentation and validation-only changes; no application runtime or auth paths are modified.
Overview
Fixes stale
pip install "tracebloc[...]"examples that documented removed umbrella extras ([boosting],[survival]) and a low>=0.8.1floor that could resolve to releases without those extras whilepipstill exits 0.Docs:
tools-help/tracebloc.mdxnow lists per-library extras (xgboost,lifelines, etc.), bumps floors to>=0.18.1, documents Python 3.11–3.12, and warns that bad extras fail silently.join-use-case/start-training.mdxswitches the conda env to Python 3.12 and aligns install lines with the same version floor.Automation: Adds
scripts/check-sdk-extras.pyto scan.md/.mdxfortracebloc[...]specs and assert each extra exists in the PyPI release the specifier resolves to. Wired intomake check-all/make check-sdk-extrasand.github/workflows/sdk-extras-check.yml(PR/push, weekly cron, manual dispatch).Reviewed by Cursor Bugbot for commit f7a8a6c. Bugbot is set up for automated code reviews on this repo. Configure here.