fiftyone.core.session.notebooks¶
Session notebook handling
Classes:
|
Functions:
|
|
|
Displays a running FiftyOne instance. |
|
Display a FiftyOne instance in a Colab output frame. |
|
-
class
fiftyone.core.session.notebooks.
NotebookCell
(address: str, height: int, handle: 'IPython.display.DisplayHandle', port: int, subscription: str)¶ Bases:
object
Attributes:
-
address
: str = None¶
-
height
: int = None¶
-
handle
: 'IPython.display.DisplayHandle' = None¶
-
port
: int = None¶
-
subscription
: str = None¶
-
-
fiftyone.core.session.notebooks.
capture
(cell: fiftyone.core.session.notebooks.NotebookCell, data: fiftyone.core.session.events.CaptureNotebookCell) → None¶
-
fiftyone.core.session.notebooks.
display
(cell: fiftyone.core.session.notebooks.NotebookCell, reactivate: bool = False) → None¶ Displays a running FiftyOne instance.
-
fiftyone.core.session.notebooks.
display_ipython
(cell: fiftyone.core.session.notebooks.NotebookCell, reactivate: bool = False) → None¶
-
fiftyone.core.session.notebooks.
display_colab
(cell: fiftyone.core.session.notebooks.NotebookCell, reactivate: bool = False) → None¶ Display a FiftyOne instance in a Colab output frame.
The Colab VM is not directly exposed to the network, so the Colab runtime provides a service worker tunnel to proxy requests from the end user’s browser through to servers running on the Colab VM: the output frame may issue requests to https://localhost:<port> (HTTPS only), which will be forwarded to the specified port on the VM.
It does not suffice to create an iframe and let the service worker redirect its traffic (<iframe src=”https://localhost:6006”>), because for security reasons service workers cannot intercept iframe traffic. Instead, we manually fetch the FiftyOne index page with an XHR in the output frame, and inject the raw HTML into document.body.