Ipywidgets not displaying on aws sagemaker fastai

I’m having an issue running the ipywidgets on my aws sagemaker notebook instance. I’ve been using the us-east-1 aws stack to create the instance::

If I choose the fastai Jupyterlab kernel everything works well, except for the UI widgets that are not displaying.

For example after opening the 02_production.ipynb notebook the GUI components (ipywidgets) are not displaying, for:
btn_upload = widgets.FileUpload()
btn_upload

the output displayed is:
FileUpload(value={}, description=‘Upload’)

instead of a button.

To reproduce this issue:

  1. Create a aws sagemaker notebook instance (using a stack from link above)
  2. Launch Jupyterlabs from the notebook instance
  3. In Jupyterlabs try to display a UI widget -> note that it doesn’t get displayed

Without the UI widgets it is difficult to follow the examples.
I was wondering if someone else is encountering the same problem and has a solution for this.
Thanks!

Looks like I found a solution, the trick was to:

  1. From Sagemaker Notebook Instances select ‘Open Jupyter’
  2. in Jupyter select the Nbextensions tab
  3. Uncheck the box ‘disable configurations for nbextensions…’
  4. Open Jupyterlab -> Now the UI widgets work in Jupyterlab :slight_smile: