Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Displays Resulting in Blank Cell Output - Dash mode = "external"? #229

Open
MeredithHilgeman opened this issue Apr 30, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@MeredithHilgeman
Copy link

When I try to use the show function to display any output the cell will run without errors, however there is a blank cell output with no interactive display. I have used the set_show_addr((ip,port)) function to set the appropriate ip address and port for my server/instance, so the cell runs just fine, it's just the display that is missing:
interpret_show_issue

After some investigating I think it has to do with dash. When I run the dash demo below I get the same blank cell output with mode = "inline", however I am able to get the expected output with mode = "external". Do you have any insight into why the external mode seems to work for dash and not the inline mode? Are there any plans or thoughts around adding an option to the interpret package for setting the dash mode to external for displays, much like I was able to set up ip address and port?

Dash Demo:

import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
from dash.dependencies import Input, Output
from jupyter_dash import JupyterDash
 
df = px.data.tips()
 
app = JupyterDash(__name__)
app.layout = html.Div(
    [
        html.H1("JupyterDash Demo"),
        dcc.Graph(id="graph"),
        html.Label(
            [
                "colorscale",
                dcc.Dropdown(
                    id="colorscale-dropdown",
                    clearable=False,
                    value="plasma",
                    options=[
                        {"label": c, "value": c} for c in px.colors.named_colorscales()
                    ],),]),])
 
 
@app.callback(Output("graph", "figure"), [Input("colorscale-dropdown", "value")])
def update_figure(colorscale):
    return px.scatter(
        df,
        x="total_bill",
        y="tip",
        color="size",
        color_continuous_scale=colorscale,
        render_mode="webgl",
        title="Tips",
    )

Cell runs, but output is blank:

app.run_server(
    mode="inline",
    host="__server__.__company__.com"
)

Cell runs and output can be seen in a new tab that pops up:

app.run_server(mode="external", host="__server__.__company__.com")
@interpret-ml
Copy link
Collaborator

Hi @MeredithHilgeman - thanks for the suggestion.

Will need some more information about your notebook environment? Is this a cloud based Jupyter notebook or lab?

@MeredithHilgeman
Copy link
Author

@interpret-ml - I am working on a Linux Virtual Machine from a Windows PC. Both the Windows PC (Windows 10) and Linux VM (Red Hat Enterprise Linux Server release 7.9 (Maipo)) are on my corporate network. On the Linux VM I'm using a Virtual Environment to run JupyterLab on Chrome. Versions of packages below:

Python - 3.6.12
JupyterLab - 4.4.0
InterpretML - 0.2.4
Plot.ly - 4.14.3
Dash - 1.20.0

@paulbkoch paulbkoch mentioned this issue Jan 29, 2023
@paulbkoch paulbkoch added the bug Something isn't working label Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants