ImageClassifierCleaner works on jupyter notebook, not lab

In the hopes this helps someone else, I just figured out that ImageClassifierCleaner seems to work as expected when run from jupyter notebook, but does not run from jupyter lab. In jupyter lab, the pictures print out, but no widgets pop up.

I didn’t expect there would be a distinction, but that’s what I’m seeing. Perhaps there are jupyter lab instructions that I missed?

I’m running locally on Ubuntu 20.04.

> jupyter notebook --version
> jupyter lab --version

>>> fastbook.__version__
>>> fastai.__version__

Jupyter Lab seems to need some other dependencies for widgets etc. to work, e.g. nodejs.

My Ubuntu build script had the following (not sure if all of them are needed!), and things seem to work in Jupyter Lab:

pip3 install ipywidgets
curl -sL | bash -
apt-get install -y nodejs
jupyter labextension install @jupyter-widgets/jupyterlab-manager