fiftyone.core.session.notebooks¶
Session notebook handling.
Classes:
|
Functions:
|
|
|
Displays a running FiftyOne instance. |
|
|
|
Display a FiftyOne instance in a Colab output frame. |
|
Display a FiftyOne instance in a Databricks 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¶
-
height
: int¶
-
handle
: IPython.core.display_functions.DisplayHandle¶
-
port
: int¶
-
subscription
: str¶
-
-
fiftyone.core.session.notebooks.
capture
(cell: fiftyone.core.session.notebooks.NotebookCell, data: fiftyone.core.session.events.CaptureNotebookCell, proxy_url: Optional[str] = None) → None¶
-
fiftyone.core.session.notebooks.
display
(client: fiftyone.core.session.client.Client, cell: fiftyone.core.session.notebooks.NotebookCell, proxy_url: Optional[str] = None, reactivate: bool = False) → None¶ Displays a running FiftyOne instance.
-
fiftyone.core.session.notebooks.
display_ipython
(client: fiftyone.core.session.client.Client, cell: fiftyone.core.session.notebooks.NotebookCell, proxy_url: Optional[str] = None, reactivate: bool = False, **kwargs: Dict[str, Union[str, bool]]) → None¶
-
fiftyone.core.session.notebooks.
display_colab
(client: fiftyone.core.session.client.Client, cell: fiftyone.core.session.notebooks.NotebookCell, proxy_url: Optional[str] = None, 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.
-
fiftyone.core.session.notebooks.
display_databricks
(client: fiftyone.core.session.client.Client, cell: fiftyone.core.session.notebooks.NotebookCell, proxy_url: Optional[str] = None, reactivate: bool = False)¶ Display a FiftyOne instance in a Databricks output frame.
The Databricks driver port is accessible via a proxy url and can be displayed inside an IFrame.