Implementation helper for running rerun-sdk in notebooks
Actively maintained. Last release 5 days ago. A safe choice.
pip install rerun-notebookrerun-notebook
Part of the Rerun project.
What?
rerun-notebook is a support package for rerun-sdk's notebook integration. This is an implementation package that shouldn't be directly interacted with. It is typically installed using the notebook extra of rerun-sdk:
pip install "rerun-sdk[notebook]"
Why a separate package?
There are several reasons for this package to be separate from the main rerun-sdk package:
rerun-notebookincludes the JS+Wasm distribution of the Rerun viewer (~31MiB). Adding it to the mainrerun-sdkpackage would double its file size.rerun-notebookuses hatch as package backend, and benefits from the hatch-jupyter-builder plug-in. Sincererun-sdkmust use Maturin, it would make the package management more complex.- Developer experience: building
rerun-notebookimplies buildingrerun_js, which is best avoided when iterating onrerun-sdkoutside of notebook environments.
Ways to access the widget assets
Even though rerun_notebook ships with the assets bundled in, by default it will try to load them from
https://app.rerun.io. This is because the way anywiget transmits the asset at the moment results in
a memory leak of the entire module for each cell execution.
If your network does not allow you to access app.rerun.io, the behavior can be changed by setting the
the RERUN_NOTEBOOK_ASSET environment variable before you import rerun_notebook. This variable must
be set prior to your import because AnyWidget stores the resource on the widget class instance
once at import time.
The assets are:
re_viewer_bg.wasm, which is our Viewer compiled to Wasm, and