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 165 forks source link

Error when trying to reproduce example notebook locally #221

Closed ricardobarroslourenco closed 1 year ago

ricardobarroslourenco commented 1 year ago

I am trying to re-run locally the notebook provided in the tutorial section: https://colab.research.google.com/github/pair-code/what-if-tool/blob/master/WIT_Age_Regression.ipynb

And I have got the following error:

[Open Browser Console for more detailed log - Double click to close this message]
Failed to create view for 'WITView' from module 'wit-widget' with model 'DOMWidgetModel' from module '@jupyter-widgets/base'
n@http://localhost:8888/static/lab/3790.af02260a4ebe28e0dd86.js?v=af02260a4ebe28e0dd86:1:49265
14416/create_view/e.state_change<@http://localhost:8888/static/lab/4416.9d6d0a2f3f9ed5d7b141.js?v=9d6d0a2f3f9ed5d7b141:1:4346

Any idea on what may be going on? I am using Jupyter-lab, and use the install procedures as described here.

jameswex commented 1 year ago

what version of Jupyter Lab are you using? See https://github.com/pair-code/what-if-tool#how-do-i-enable-it-for-use-in-a-jupyterlab-or-cloud-ai-platform-notebook for some more details on using in Jupyter Lab.

ricardobarroslourenco commented 1 year ago

Hi @jameswex ! I have followed these guidelines on the link you mentioned (I was following the tutorial "Getting Started in Notebooks" at PAIR's page, which seems the same).

I am using Jupyter-lab 3.4.8. My environment is a conda-like, in an Ubuntu 22.04 LTS, as follows:

(tensorflow) ricardo@ricardo-XPS-8940:~$ conda list -e
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
_libgcc_mutex=0.1=conda_forge
_openmp_mutex=4.5=2_gnu
abseil-cpp=20220623.0=h93e1e8c_4
absl-py=1.2.0=pyhd8ed1ab_0
aiohttp=3.8.3=py39hb9d737c_0
aiosignal=1.2.0=pyhd8ed1ab_0
alsa-lib=1.2.3.2=h166bdaf_0
anyio=3.6.1=py39hf3d152e_0
argon2-cffi=21.3.0=pyhd8ed1ab_0
argon2-cffi-bindings=21.2.0=py39hb9d737c_2
arrow-cpp=9.0.0=py39hb3b17c4_7_cpu
asttokens=2.0.8=pyhd8ed1ab_0
astunparse=1.6.3=pyhd8ed1ab_0
async-timeout=4.0.2=pyhd8ed1ab_0
atk-1.0=2.36.0=h3371d22_4
attr=2.5.1=h166bdaf_1
attrs=22.1.0=pyh71513ae_1
aws-c-cal=0.5.11=h95a6274_0
aws-c-common=0.6.2=h7f98852_0
aws-c-event-stream=0.2.7=h3541f99_13
aws-c-io=0.10.5=hfb6a706_0
aws-checksums=0.1.11=ha31a3da_7
aws-sdk-cpp=1.8.186=hb4091e7_3
babel=2.10.3=pyhd8ed1ab_0
backcall=0.2.0=pyh9f0ad1d_0
backports=1.0=py_2
backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0
beautifulsoup4=4.11.1=pyha770c72_0
bleach=5.0.1=pyhd8ed1ab_0
blinker=1.5=pyhd8ed1ab_0
brotli=1.0.9=h166bdaf_7
brotli-bin=1.0.9=h166bdaf_7
brotlipy=0.7.0=py39hb9d737c_1004
bzip2=1.0.8=h7f98852_4
c-ares=1.18.1=h7f98852_0
ca-certificates=2022.9.24=ha878542_0
cached-property=1.5.2=hd8ed1ab_1
cached_property=1.5.2=pyha770c72_1
cachetools=4.2.4=pyhd8ed1ab_0
cairo=1.16.0=ha61ee94_1014
certifi=2022.9.24=pyhd8ed1ab_0
cffi=1.15.1=py39he91dace_0
charset-normalizer=2.1.1=pyhd8ed1ab_0
click=8.1.3=py39hf3d152e_0
cryptography=38.0.1=py39hd97740a_0
cudatoolkit=11.7.0=hd8887f6_10
cudatoolkit-dev=11.4.0=h5764c6d_5
cudnn=8.4.1.50=hed8a83a_0
cycler=0.11.0=pyhd8ed1ab_0
dbus=1.13.6=h5008d03_3
debugpy=1.6.3=py39h5a03fae_0
decorator=5.1.1=pyhd8ed1ab_0
defusedxml=0.7.1=pyhd8ed1ab_0
entrypoints=0.4=pyhd8ed1ab_0
executing=1.1.1=pyhd8ed1ab_0
expat=2.4.9=h27087fc_0
fftw=3.3.10=nompi_hf0379b8_105
flatbuffers=2.0.7=h27087fc_0
flit-core=3.7.1=pyhd8ed1ab_0
font-ttf-dejavu-sans-mono=2.37=hab24e00_0
font-ttf-inconsolata=3.000=h77eed37_0
font-ttf-source-code-pro=2.038=h77eed37_0
font-ttf-ubuntu=0.83=hab24e00_0
fontconfig=2.14.0=hc2a2eb6_1
fonts-conda-ecosystem=1=0
fonts-conda-forge=1=0
fonttools=4.37.4=py39hb9d737c_0
freetype=2.12.1=hca18f0e_0
fribidi=1.0.10=h36c2ea0_0
frozenlist=1.3.1=py39hb9d737c_0
gast=0.4.0=pyh9f0ad1d_0
gdk-pixbuf=2.42.8=hff1cb4f_1
gettext=0.19.8.1=h27087fc_1009
gflags=2.2.2=he1b5a44_1004
giflib=5.2.1=h36c2ea0_2
glib=2.74.0=h6239696_0
glib-tools=2.74.0=h6239696_0
glog=0.6.0=h6f12383_0
google-api-core=2.10.2=pypi_0
google-api-python-client=2.66.0=pypi_0
google-auth=1.35.0=pyh6c4a22f_0
google-auth-httplib2=0.1.0=pypi_0
google-auth-oauthlib=0.4.6=pyhd8ed1ab_0
google-pasta=0.2.0=pyh8c360ce_0
googleapis-common-protos=1.57.0=pypi_0
graphite2=1.3.13=h58526e2_1001
graphviz=6.0.1=h5abf519_0
grpc-cpp=1.47.1=h05bd8bd_6
grpcio=1.47.1=py39h712372c_6
gst-plugins-base=1.20.2=hcf0ee16_0
gstreamer=1.20.3=hd4edc92_2
gtk2=2.24.33=h90689f9_2
gts=0.7.6=h64030ff_2
h5py=3.1.0=nompi_py39h25020de_100
harfbuzz=5.3.0=h418a68e_0
hdf5=1.10.6=nompi_h6a2412b_1114
httplib2=0.21.0=pypi_0
icu=70.1=h27087fc_0
idna=3.4=pyhd8ed1ab_0
importlib-metadata=4.11.4=py39hf3d152e_0
importlib_resources=5.10.0=pyhd8ed1ab_0
ipykernel=6.16.0=pyh210e3f2_0
ipython=8.5.0=pyh41d4057_1
ipython_genutils=0.2.0=py_1
ipywidgets=8.0.2=pypi_0
jack=1.9.18=hfd4fe87_1001
jedi=0.18.1=py39hf3d152e_1
jinja2=3.1.2=pyhd8ed1ab_1
joblib=1.2.0=pyhd8ed1ab_0
jpeg=9e=h166bdaf_2
json5=0.9.5=pyh9f0ad1d_0
jsonschema=4.16.0=pyhd8ed1ab_0
jupyter_client=7.3.5=pyhd8ed1ab_0
jupyter_core=4.11.1=py39hf3d152e_0
jupyter_server=1.19.1=pyhd8ed1ab_0
jupyterlab=3.4.8=pyhd8ed1ab_0
jupyterlab-tensorboard-pro=0.3.2=pypi_0
jupyterlab-widgets=3.0.3=pypi_0
jupyterlab_pygments=0.2.2=pyhd8ed1ab_0
jupyterlab_server=2.15.2=pyhd8ed1ab_0
keras=2.10.0=pyhd8ed1ab_0
keras-preprocessing=1.1.2=pyhd8ed1ab_0
keyutils=1.6.1=h166bdaf_0
kiwisolver=1.4.4=py39hf939315_0
krb5=1.19.3=h3790be6_0
lcms2=2.12=hddcbb42_0
ld_impl_linux-64=2.36.1=hea4e1c9_2
lerc=4.0.0=h27087fc_0
libabseil=20220623.0=cxx17_h48a1fff_4
libblas=3.9.0=16_linux64_openblas
libbrotlicommon=1.0.9=h166bdaf_7
libbrotlidec=1.0.9=h166bdaf_7
libbrotlienc=1.0.9=h166bdaf_7
libcap=2.64=ha37c62d_0
libcblas=3.9.0=16_linux64_openblas
libclang=13.0.1=default_hc23dcda_0
libcrc32c=1.1.2=h9c3ff4c_0
libcups=2.3.3=h3e49a29_2
libcurl=7.85.0=h7bff187_0
libdb=6.2.32=h9c3ff4c_0
libdeflate=1.14=h166bdaf_0
libedit=3.1.20191231=he28a2e2_2
libev=4.33=h516909a_1
libevent=2.1.10=h9b69904_4
libffi=3.4.2=h7f98852_5
libflac=1.3.4=h27087fc_0
libgcc-ng=12.1.0=h8d9b700_16
libgd=2.3.3=h18fbbfe_3
libgfortran-ng=12.1.0=h69a702a_16
libgfortran5=12.1.0=hdcd56e2_16
libglib=2.74.0=h7a41b64_0
libgomp=12.1.0=h8d9b700_16
libgoogle-cloud=2.2.0=h838d150_1
libiconv=1.17=h166bdaf_0
liblapack=3.9.0=16_linux64_openblas
libllvm13=13.0.1=hf817b99_2
libnghttp2=1.47.0=hdcd2b5c_1
libnsl=2.0.0=h7f98852_0
libogg=1.3.4=h7f98852_1
libopenblas=0.3.21=pthreads_h78a6416_3
libopus=1.3.1=h7f98852_1
libpng=1.6.38=h753d276_0
libpq=14.5=hd77ab85_0
libprotobuf=3.21.7=h6239696_0
librsvg=2.54.4=h7abd40a_0
libsndfile=1.0.31=h9c3ff4c_1
libsodium=1.0.18=h36c2ea0_1
libsqlite=3.39.4=h753d276_0
libssh2=1.10.0=haa6b8db_3
libstdcxx-ng=12.1.0=ha89aaad_16
libthrift=0.16.0=h491838f_2
libtiff=4.4.0=h55922b4_4
libtool=2.4.6=h9c3ff4c_1008
libudev1=249=h166bdaf_4
libutf8proc=2.7.0=h7f98852_0
libuuid=2.32.1=h7f98852_1000
libuv=1.44.2=h166bdaf_0
libvorbis=1.3.7=h9c3ff4c_0
libwebp=1.2.4=h522a892_0
libwebp-base=1.2.4=h166bdaf_0
libxcb=1.13=h7f98852_1004
libxkbcommon=1.0.3=he3ba5ed_0
libxml2=2.9.14=h22db469_4
libzlib=1.2.12=h166bdaf_4
lz4-c=1.9.3=h9c3ff4c_1
markdown=3.4.1=pyhd8ed1ab_0
markupsafe=2.1.1=py39hb9d737c_1
matplotlib=3.5.3=py39hf3d152e_2
matplotlib-base=3.5.3=py39h19d6b11_2
matplotlib-inline=0.1.6=pyhd8ed1ab_0
mistune=2.0.4=pyhd8ed1ab_0
multidict=6.0.2=py39hb9d737c_1
munkres=1.1.4=pyh9f0ad1d_0
mysql-common=8.0.30=haf5c9bc_1
mysql-libs=8.0.30=h28c427c_1
nbclassic=0.4.5=pyhd8ed1ab_0
nbclient=0.7.0=pyhd8ed1ab_0
nbconvert=7.2.1=pyhd8ed1ab_0
nbconvert-core=7.2.1=pyhd8ed1ab_0
nbconvert-pandoc=7.2.1=pyhd8ed1ab_0
nbformat=5.7.0=pyhd8ed1ab_0
nccl=2.14.3.1=h0800d71_0
ncurses=6.3=h27087fc_1
nest-asyncio=1.5.6=pyhd8ed1ab_0
nodejs=18.11.0=h96d913c_0
notebook=6.4.12=pyha770c72_0
notebook-shim=0.1.0=pyhd8ed1ab_0
nspr=4.32=h9c3ff4c_1
nss=3.78=h2350873_0
numpy=1.23.3=py39hba7629e_0
oauth2client=4.1.3=pypi_0
oauthlib=3.2.1=pyhd8ed1ab_0
openjpeg=2.5.0=h7d73246_1
openssl=1.1.1s=h166bdaf_0
opt_einsum=3.3.0=pyhd8ed1ab_1
orc=1.8.0=h09e0d61_0
packaging=21.3=pyhd8ed1ab_0
pandas=1.4.4=py39h1832856_0
pandoc=2.19.2=ha770c72_0
pandocfilters=1.5.0=pyhd8ed1ab_0
pango=1.50.11=h382ae3d_0
parquet-cpp=1.5.1=2
parso=0.8.3=pyhd8ed1ab_0
patsy=0.5.3=pyhd8ed1ab_0
pcre2=10.37=hc3806b6_1
pexpect=4.8.0=pyh9f0ad1d_2
pickleshare=0.7.5=py39hde42818_1002
pillow=9.2.0=py39hd5dbb17_2
pip=22.2.2=pyhd8ed1ab_0
pixman=0.40.0=h36c2ea0_0
pkgutil-resolve-name=1.3.10=pyhd8ed1ab_0
prometheus_client=0.14.1=pyhd8ed1ab_0
prompt-toolkit=3.0.31=pyha770c72_0
protobuf=4.21.7=py39h5a03fae_0
psutil=5.9.2=py39hb9d737c_0
pthread-stubs=0.4=h36c2ea0_1001
ptyprocess=0.7.0=pyhd3deb0d_0
pulseaudio=14.0=hbc9ff1d_7
pure_eval=0.2.2=pyhd8ed1ab_0
pyarrow=9.0.0=py39h6267de0_7_cpu
pyasn1=0.4.8=py_0
pyasn1-modules=0.2.7=py_0
pycparser=2.21=pyhd8ed1ab_0
pydot=1.4.2=py39hf3d152e_3
pygments=2.13.0=pyhd8ed1ab_0
pyjwt=2.5.0=pyhd8ed1ab_0
pyopenssl=22.1.0=pyhd8ed1ab_0
pyparsing=3.0.9=pyhd8ed1ab_0
pyqt=5.15.4=py39h5a03fae_0
pyqt5-sip=12.9.0=py39h5a03fae_0
pyrsistent=0.18.1=py39hb9d737c_1
pysocks=1.7.1=py39hf3d152e_5
python=3.9.13=h9a8a25e_0_cpython
python-dateutil=2.8.2=pyhd8ed1ab_0
python-fastjsonschema=2.16.2=pyhd8ed1ab_0
python-flatbuffers=2.0=pyhd8ed1ab_0
python_abi=3.9=2_cp39
pytz=2022.4=pyhd8ed1ab_0
pyu2f=0.1.5=pyhd8ed1ab_0
pyzmq=24.0.1=py39headdf64_0
qt-main=5.15.3=hf97cb25_0
re2=2022.06.01=h27087fc_0
readline=8.1.2=h0f457ee_0
requests=2.28.1=pyhd8ed1ab_1
requests-oauthlib=1.3.1=pyhd8ed1ab_0
rsa=4.9=pyhd8ed1ab_0
s2n=1.0.10=h9b69904_0
scikit-learn=1.1.2=py39he5e8d7e_0
scipy=1.9.1=py39h8ba3f38_0
seaborn=0.12.0=hd8ed1ab_0
seaborn-base=0.12.0=pyhd8ed1ab_0
send2trash=1.8.0=pyhd8ed1ab_0
setuptools=65.4.1=pyhd8ed1ab_0
sip=6.5.1=py39he80948d_2
six=1.15.0=pyh9f0ad1d_0
snappy=1.1.9=hbd366e4_1
sniffio=1.3.0=pyhd8ed1ab_0
soupsieve=2.3.2.post1=pyhd8ed1ab_0
sqlite=3.39.4=h4ff8645_0
stack_data=0.5.1=pyhd8ed1ab_0
statsmodels=0.13.2=py39hd257fcd_0
tensorboard=2.10.1=pyhd8ed1ab_0
tensorboard-data-server=0.6.0=py39hd97740a_2
tensorboard-plugin-wit=1.8.1=pyhd8ed1ab_0
tensorflow=2.10.0=cuda112py39h01bd6f0_0
tensorflow-addons=0.18.0=pypi_0
tensorflow-base=2.10.0=cuda112py39h2957820_0
tensorflow-estimator=2.10.0=cuda112py39hd320b7a_0
tensorflow-gpu=2.10.0=cuda112py39h0bbbad9_0
termcolor=1.1.0=pyhd8ed1ab_3
terminado=0.16.0=pyh41d4057_0
threadpoolctl=3.1.0=pyh8a188c0_0
tinycss2=1.1.1=pyhd8ed1ab_0
tk=8.6.12=h27826a3_0
toml=0.10.2=pyhd8ed1ab_0
tomli=2.0.1=pyhd8ed1ab_0
tornado=6.2=py39hb9d737c_0
traitlets=5.4.0=pyhd8ed1ab_0
typeguard=2.13.3=pypi_0
typing-extensions=3.7.4.3=0
typing_extensions=3.7.4.3=py_0
tzdata=2022d=h191b570_0
unicodedata2=14.0.0=py39hb9d737c_1
uritemplate=4.1.1=pypi_0
urllib3=1.26.11=pyhd8ed1ab_0
wcwidth=0.2.5=pyh9f0ad1d_2
webencodings=0.5.1=py_1
websocket-client=1.4.1=pyhd8ed1ab_0
werkzeug=2.2.2=pyhd8ed1ab_0
wheel=0.37.1=pyhd8ed1ab_0
widgetsnbextension=4.0.3=pypi_0
witwidget=1.8.1=pypi_0
wrapt=1.12.1=py39h3811e60_3
xorg-kbproto=1.0.7=h7f98852_1002
xorg-libice=1.0.10=h7f98852_0
xorg-libsm=1.2.3=hd9c2040_1000
xorg-libx11=1.7.2=h7f98852_0
xorg-libxau=1.0.9=h7f98852_0
xorg-libxdmcp=1.1.3=h7f98852_0
xorg-libxext=1.3.4=h7f98852_1
xorg-libxrender=0.9.10=h7f98852_1003
xorg-renderproto=0.11.1=h7f98852_1002
xorg-xextproto=7.3.0=h7f98852_1002
xorg-xproto=7.0.31=h7f98852_1007
xz=5.2.6=h166bdaf_0
yarl=1.7.2=py39hb9d737c_2
zeromq=4.3.4=h9c3ff4c_1
zipp=3.9.0=pyhd8ed1ab_0
zlib=1.2.12=h166bdaf_4
zstd=1.5.2=h6239696_4
ricardobarroslourenco commented 1 year ago

@jameswex , FYI, I have opened the same notebook, and it works smoothly on Colab (as expected).

Do you have any idea how can I make it work on my machine? I often use HPC premises to train my models, so I wonder if my environment setup may be causing issues.

ricardobarroslourenco commented 1 year ago

I have also tried to downgrade the JupyterLab version to 2.3.2 (as mentioned in an old tweet of yours - https://twitter.com/bengiswex/status/1351566658008186881?s=20&t=y0pCNpYau2QAF2eJxE2paA ) but it still does not work.

jameswex commented 1 year ago

Hmm I also see issues running WIT in jupyterlab, testing from scratch today. I wonder if there's some regression due to some changes in jupyter deps or browsers.

In general, WIT isn't actively being developed.

I would recommend checking out our follow-on work LIT (https://pair-code.github.io/lit/) which works in JupyterLab, and Colab, and as a standalone server, and can do basically everything WIT can do and much, much more.

There will be a new release in ~2 weeks of LIT that adds a bunch of features and renames it to make it clear it isn't only for language models.

ricardobarroslourenco commented 1 year ago

I see. I will look forward into LIT then. Thanks for the follow-up.