voxel51/fiftyone

[FR] Add helpful error message when using the App in a remote notebook without appropriate port forwarding

Open

#1,128 opened on Jul 16, 2021

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Python (400 forks)batch import
appenhancementgood first issuenotebook

Repository metrics

Stars
 (4,021 stars)
PR merge metrics
 (Avg merge 3d 11h) (161 merged PRs in 30d)

Description

When using the FiftyOne App in a remote Jupyter notebook, you need to forward the port used by the App (say YYYY):

# On local machine
ssh -N -L 5151:localhost:YYYY [<username>@]<hostname>

so that when you launch the App in a notebook cell:

# Launch the App in a notebook cell
session = fo.launch_app(dataset, port=YYYY)

you will see the App as expected.

However, if you don't forward the port, you'll see this when launching the App:

It would be helpful to the user if we detected this case and printed a helpful error message instructing the user how to forward the port and pointing them to documentation on the subject.

Contributor guide