Notebook / ColabΒΆ

You can launch the Burr UI directly from a Jupyter notebook or Google Colab using the %burr_ui IPython magic, without needing a separate terminal.

Jupyter NotebookΒΆ

# Load the extension and show the UI inline
%load_ext burr.integrations.notebook
%burr_ui

The first time it runs, the magic starts the tracking server on port 7241 in a background process and displays the UI in an iframe below the cell. Running it again reuses that server (and starts a new one if the previous process has exited).

It accepts two optional arguments:

  • --height (or -h): the height of the iframe in pixels. Defaults to 400.

  • --no-iframe: print the URL of the UI instead of embedding it.

%burr_ui --height 600
%burr_ui --no-iframe
# β†’ "Burr UI: http://127.0.0.1:7241"

Google ColabΒΆ

In Colab, the kernel runs remotely, so you need to forward the port to your browser:

%load_ext burr.integrations.notebook
%burr_ui
from google.colab import output
output.serve_kernel_port_as_window(7241)   # opens a new browser window
output.serve_kernel_port_as_iframe(7241)   # or inline as an iframe