PAIR-code / what-if-tool

Source code/webpage/demos for the What-If Tool
https://pair-code.github.io/what-if-tool
Apache License 2.0
892 stars 167 forks source link

Widget not loading across multiple applications #100

Open bricha2 opened 4 years ago

bricha2 commented 4 years ago

I am working on several different tools that use the What-If tool for interactive visuals. It seems like I keep running into the same error where I see 'Loading Widget...' and no visual.

Currently, I am working in the JupyterLab Environment of Google Cloud's AI Platform.

I have did the following installations: pip install ipywidgets jupyter nbextension enable --py widgetsnbextension conda install -c conda-forge nodejs jupyter nbextension install --py --user witwidget jupyter nbextension enable witwidget --user --py jupyter labextension install @jupyter-widgets/jupyterlab-manager

And have the following jupyterlab list:

JupyterLab v1.2.16 Known labextensions: app dir: /opt/conda/share/jupyter/lab @jupyter-widgets/jupyterlab-manager v1.1.0 enabled OK @jupyterlab/celltags v0.2.0 enabled OK @jupyterlab/git v0.10.1 enabled OK js v0.1.0 enabled OK jupyter-matplotlib v0.7.2 enabled OK jupyterlab-plotly v4.8.1 enabled OK nbdime-jupyterlab v1.0.0 enabled OK plotlywidget v4.8.1 enabled OK wit-widget v1.6.0 enabled OK

It would be helpful if you had any insight on why this problem might be occuring!

jameswex commented 4 years ago

So you are using Google Cloud AI Platform notebooks (which are JupyterLab instances)? If so, when you created the instance in the GCP UI, do you know which instance type you used? The TensorFlow instance types should come with the What-If Tool widget pre-installed so no installation steps should be necessary.

I just created a TF 2.1 enterprise instance (without GPU) as a test, and a notebook with this cell showed a What-If Tool (with no data or model) correctly:

from witwidget.notebook.visualization import WitWidget, WitConfigBuilder
WitWidget(WitConfigBuilder([]))
bricha2 commented 4 years ago

Good afternoon! So those particular lines are working, but the original lines from Microsoft's FairLearn and Google's Fairness Indicator are both still giving 'Loading...' messages. For FairLearn, I am just running the tutorial here: https://fairlearn.github.io/quickstart.html.

I will be reaching out to these developers, as well, to see if this is a problem with both apps, perhaps?