blobhub package, written against this SDK. Three download a public ONNX
model and run it with ONNX Runtime, with no account. The fourth exports a model with PyTorch and uploads it to an
ONNX blob of yours. blobhub.notebooks lists them and copies one out of the package.
Run one
super-resolution.ipynb in JupyterLab, VS Code or any other Jupyter environment, and run it from the top. Its
first cell installs what it needs. To run it without opening it:
The notebooks
The three without a credential read the public blobs
onnx-text-models/bi-att-flow,
onnx-vision-models/super-resolution and
onnx-vision-models/object-detection. The two vision
notebooks fetch their input photo, and object detection its class labels, from
static.blobhub.io. BiDAF’s
passages and questions are written in the notebook, and NLTK downloads its tokenizer data.
Each notebook’s first cell is its only %pip install:
Public models need no account
The three public notebooks connect withblobhub.connect(anonymous=True). That ignores any profile stored on the
machine, so a stale, revoked or foreign profile cannot break them, and no sign-in is needed. Their downloads are
cached under ~/.cache/blobhub, so a second run fetches nothing. See
Credentials and profiles.
The end-to-end notebook needs your blob
onnx/super-resolution-end-to-end uploads to an ONNX blob you can write to:
- Create an ONNX blob on blobhub.io, or pick one you have.
- Store a credential that can write to it, with
blobhub loginor by exportingBLOBHUB_API_KEY. The notebook callsblobhub.connect(), which finds either. - Set
ORGandBLOBin the notebook’s “Your blob” cell, each an alias or an id.
revision.commit(). It needs PyTorch 2.5 or newer.
From Python
blobhub.notebooks.list()returns aNotebook(id, title)for each, in the order above.blobhub.notebooks.copy(notebook_id, dest=".")copies one and returns the new file’sPath. An existing folder, or a string ending in/, receives<last part of the id>.ipynb, and the folder is created if missing. Anything else is the file path to write.copynever overwrites: an existing target raisesFileExistsError. An unknown id raisesValueError.
The command line
python -m blobhub.notebooks is the SDK’s only command-line surface.
An unknown id exits
2, as does a usage error. A target that exists, or a folder that cannot be written, exits 1.
Each error is one error: … line on stderr.
See also
- ONNX — the typed module every notebook uses.
- Credentials and profiles — what
connect()andconnect(anonymous=True)read.

