Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype UI integration with Jupyter widget #173

Open
2 tasks done
filippomc opened this issue Jun 3, 2020 · 6 comments
Open
2 tasks done

Prototype UI integration with Jupyter widget #173

filippomc opened this issue Jun 3, 2020 · 6 comments
Assignees

Comments

@filippomc
Copy link
Collaborator

filippomc commented Jun 3, 2020

The idea behind is to allow NWB jupyter widgets visualizations to be used as visualizer for nwb types.
With this integration, the NWB Explorer will greatly expand the support on NWB types.
Jupyter widgets should be exported to be used outside a jupyter notebook context.

  • Evaluate Voila or other alternative librariy that created a exportable version of a jupyter widget
  • Create a PoC of widget embedding
@filippomc
Copy link
Collaborator Author

proof of concept: very simple integration showing a box with whatever is coming from the jupyter widget

filippomc added a commit that referenced this issue Jun 11, 2020
filippomc added a commit that referenced this issue Jun 11, 2020
@pgleeson
Copy link
Collaborator

pgleeson commented Jul 1, 2020

@filippomc Is this live on staging?

@filippomc
Copy link
Collaborator Author

@pgleeson this is not live as it's not really workable, but you can try on branch sprint-9-poc. The solution is based on jupyter widgets html embedding: https://ipywidgets.readthedocs.io/en/latest/embedding.html#python-interface

Problems to solve:

  • Jupyter widgets uses inline matplotlib to show plots: https://github.com/NeurodataWithoutBorders/nwb-jupyter-widgets/blob/8bfd28beed63158f744a7ab7e0984c63dadd12dd/nwbwidgets/base.py#L227. Those plots are not being shown in a jupyter widget export: trying it on a desktop installation plots are shown in a popup as if running matplotlib from the command line, while get an error on a server/containerized installation. A solution for this would be to patch jupyter widgets to use a different solution, either with matplotlib or other library, that inlines the outputs instead.
  • Lazy loading. Exported widgets do not support lazy loading behaviours. They are pure js/html so don't have access to the notebook data. The only solution I can think of for this is to investigate jupyter internals and develop the embedding feature directly integrated with the notebook. This would need a consistent time investment. The good is this investigation would be useful to develop other stable interactive features (yes we have a working synchronization for netpyne but cannot be used to display widgets).

@filippomc filippomc reopened this Jul 2, 2020
@filippomc
Copy link
Collaborator Author

moved back to backlog.

@pgleeson
Copy link
Collaborator

pgleeson commented Jul 2, 2020

No problem, just saw it closed and checking...

@filippomc
Copy link
Collaborator Author

Yes thanks was a mistake. Caught the occasion to write something to plan the next moves :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants