gos icon indicating copy to clipboard operation
gos copied to clipboard

race conditions with HTML renderer

Open manzt opened this issue 2 years ago • 0 comments

There appear to be temperamental issues with loading the JS to power the gos visualization in Jupyter Notebooks. It is difficult to debug due to the browser cache and (hidden) state of saved jupyter notebooks as well.

Steps to reproduce:

  • open a new blank notebook (jupyter notebook) (Python 3.9, Chrome 95)
  • load gos and execute a cell which renders a gos.View
  • re-run the same cell

https://user-images.githubusercontent.com/24403730/140839455-c8a2337e-5568-4c50-86cd-1a43e9258a87.mov

However, if a visualization is executed in a different cell, the expected rendering behavior is restored.

https://user-images.githubusercontent.com/24403730/140839595-4a54d895-8ebf-4b62-b383-7f9cac1fa7f3.mov

My best guess is that this is related to the custom JS loading code in gosling/display.py, but this is a requirement currently since some of our JS is incompatible with the global requirejs in Jupyter Notebooks.

TL;DR - If you are having trouble with rendering, try executing a different cell and re-running the previous cell. This step only needs to be done once, and will likely occur naturally during a typical workflow. Hopefully we will have a better solution soon.

manzt avatar Nov 09 '21 00:11 manzt