Build AI with anyone. On data that can't move. SDK for the tracebloc collaborative AI workspace.
pip install tracebloc==1.2.74 Copy PIP instructions
tracebloc is a collaborative AI workspace you deploy on your own infrastructure. Invite researchers, partners, vendors, or your own teams to train, fine-tune, and benchmark models on your private data — without the data ever leaving your environment.
Pick the extra for your ML framework — the default install contains the core SDK only (~140 MB, ~30 sec) instead of every framework (~8 GB).
pip install "tracebloc[pytorch]" # most users (incl. the HuggingFace stack) pip install "tracebloc[sklearn]" # scikit-learn only pip install "tracebloc[xgboost]" # or [catboost] / [lightgbm] pip install "tracebloc[lifelines]" # or [scikit-survival] pip install "tracebloc[all]" # everything A model imports its framework when it is checked, so a model whose extra is missing fails upload_model with a ModuleNotFoundError. The message names the extra to install, e.g. a lifelines time-to-event template (cox_ph) asks for pip install 'tracebloc[lifelines]', a scikit-survival one for tracebloc[scikit-survival]. The extras are the [project.optional-dependencies] groups in pyproject.toml.
Requires Python 3.11–3.14. A current macOS or Linux python3 is inside that range; if pip tells you "No matching distribution found for tracebloc", check python3 --version first — that is what an out-of-range interpreter looks like, not a missing package.
Upgrading from an earlier version? See MIGRATION.md.
from tracebloc import User # 1. Log in to your workspace user = User() user.login() # 2. Upload your model to a use case user.upload_model(model_name="my_model") # 3. Link your model to the dataset — returns a training-plan facade training_plan = user.link_model_dataset(dataset_id=" ") # 4. Start training training_plan.start() For a full walkthrough in your own notebook, follow Start training with the quickstart notebook.
User() prompts for an email and a password. Where a prompt is not possible — a notebook that is already connected, a scheduled job, CI — set these instead and User() will not ask:
All three are optional and independent. Credentials you pass yourself always win: User(username=..., password=...) logs in with those, whatever is in the environment. TRACEBLOC_API_URL goes the other way — it is a deployment-level setting, so it applies whatever else you pass, and when it is active User() prints the host it is about to talk to.
When TRACEBLOC_API_URL points at a deployment the SDK recognises, the experiment link start() prints follows it automatically, and you do not need TRACEBLOC_APP_URL. Set that one when the API URL is something only your deployment knows — an in-cluster address, a tunnel, a preview environment. If neither names a frontend, start() prints the experiment id and no link at all, rather than a link into an environment your experiment is not in.
Any of them set to an empty value is an error rather than a silent fall-back to the prompt — in a job with no terminal, that prompt would never return. So is a token containing whitespace or a control character, which the server would reject anyway and which cannot be reported without quoting the credential back at you.
Which file a trained lifelines model downloads as depends on how many edges trained it:
from lifelines import CoxPHFitter from tracebloc.lifelines_weights import load_lifelines_model model = load_lifelines_model(" .safetensors", CoxPHFitter()) # or build the fitter from the downloaded model file: model = load_lifelines_model(" .safetensors", " .py") model.predict_partial_hazard(df) It needs pip install "tracebloc[lifelines]" and never unpickles anything. A file that is not exactly a coefficients file, a .pkl included, raises LifelinesWeightsError, and so does a fitter of another class.
To work on the tracebloc SDK and test changes with the quickstart Jupyter Notebook (also running locally), clone the quickstart repository and set up a virtual environment using Python 3.11–3.14.
python3.13 -m venv {venv_location} source {venv_location}/bin/activate pip install jupyter Or with Pyenv:
pyenv virtualenv 3.13 quickstart pyenv activate quickstart pip install jupyter Register the venv as a Jupyter kernel so the notebook uses it:
python -m ipykernel install --user --name=quickstart --display-name "quickstart" Option 1: Editable install (recommended for iterating on source) pip install -e {path_to}/tracebloc-py-package Source changes are picked up immediately — no reinstall needed. Best for day-to-day development.
pip install {path_to}/tracebloc-py-package Installs a snapshot into site-packages. You must re-run this command after every change. Useful for verifying the package works when installed normally.
Build a wheel or sdist first, then install it:
cd {path_to}/tracebloc-py-package python -m build cd {path_to}/quickstart pip install {path_to}/tracebloc-py-package/dist/tracebloc-*.whl Use this to catch packaging issues (missing files, incorrect metadata, incomplete install_requires) before publishing to PyPI.
pip install on the same package name replaces the previous installation automatically. To remove the package entirely:
pip uninstall tracebloc -y Running the notebook jupyter notebook notebooks/traceblocTrainingGuide.ipynb Select the "quickstart" kernel if it isn't already selected.
Note: skip the !pip install tracebloc[pytorch] cell in the notebook — the package is already installed locally via one of the options above.
Maintainer-only. Skip this section unless you're cutting a new tracebloc release.
Releases are tag-driven: pushing a tag matching v*.*.* on develop triggers .github/workflows/publish-release.yml, which validates the build matrix, publishes to TestPyPI, verifies the install, then waits for a manual approval before publishing to PyPI.
End-to-end shape: version check + validate matrix → TestPyPI → verify-from-TestPyPI → manual approval → PyPI → GitHub release (~20 min wall-clock with a hold at the approval gate). The release number is the tag's: the version check accepts only the number the release train derived, and the build is stamped with it.
These are configured once and stay good. Sanity-check them before the first release on a new repo:
Tag a release candidate first to exercise the pipeline without publishing to production PyPI — deny the approval gate to stop just before the PyPI upload:
git checkout develop && git pull --ff-only git tag v0.X.YrcN && git push origin v0.X.YrcN Skip this step on subsequent releases once the pipeline is known good.
GitHub: Actions → workflow run → publish-pypi job → Review deployments → production-pypi → Approve.
Once approved, the PyPI upload runs (~1 min). Verify:
pip index versions tracebloc # should show the new version Step 4 — Same-day cross-repo coordination Once the version is live on PyPI:
Skip 2 and 3 for quiet patch releases with no doc-visible surface.
CHANGELOG.md needs no edit after a release. It is an unversioned log with no release headings (RFC-0255 D6); the release's notes are in the product changelog.
Optional but recommended: pip install pre-commit && pre-commit install sets up the git hooks from .pre-commit-config.yaml. The hooks run automatically on each commit, only on the files you touch. They are a fast local guard — CI remains the guarantee.
pytorch sklearn catboost lightgbm xgboost lifelines scikit-survival all training dev
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




