Skip to content

Lightning renderer is broken inside ipywidgets.Output #36

Open
@aggFTW

Description

@aggFTW

Hello, @ellisonbg and I are working on creating an Altair ipython widget to interact with the vegalite spec that gets passed to the lightning renderer. However, @ellisonbg found that the lightning renderer is broken inside ipywidgets.Output

Probably the easiest way to get a repro would be to install latest Altair and comment out the create_render_view method here: https://github.com/ellisonbg/altair/blob/master/altair/view.py

Then, from this notebook: https://github.com/ellisonbg/altair/blob/master/notebooks/WidgetView.ipynb
add this cell: view.create_render_view(v1, shelves=('x','y','color','size'))

@ellisonbg might have better repro steps?

Issue is here: https://github.com/ellisonbg/altair/issues/82

@freeman-lab suggested opening an issue here for him and @mathisonian to take a look. Thanks!

Activity

ellisonbg

ellisonbg commented on Nov 3, 2015

@ellisonbg

This may take some digging around, but I think that using a unique
id= on the top level element may help some of these issues.

On Mon, Nov 2, 2015 at 5:48 PM, Alejandro Guerrero Gonzalez <
notifications@github.com> wrote:

Hello, @ellisonbg https://github.com/ellisonbg and I are working on
creating an Altair ipython widget to interact with the vegalite spec that
gets passed to the lightning renderer. However, @ellisonbg
https://github.com/ellisonbg found that the lightning renderer is
broken inside ipywidgets.Output

Probably the easiest way to get a repro would be to install latest Altair
and comment out the create_render_view method here:
https://github.com/ellisonbg/altair/blob/master/altair/view.py

Then, from this notebook:
https://github.com/ellisonbg/altair/blob/master/notebooks/WidgetView.ipynb
add this cell: view.create_render_view(v1,
shelves=('x','y','color','size'))

@ellisonbg https://github.com/ellisonbg might have better repro steps?

Issue is here: ellisonbg/altair#82
https://github.com/ellisonbg/altair/issues/82

@freeman-lab https://github.com/freeman-lab suggested opening an issue
here for him and @mathisonian https://github.com/mathisonian to take a
look. Thanks!


Reply to this email directly or view it on GitHub
#36.

Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgranger@calpoly.edu and ellisonbg@gmail.com

aggFTW

aggFTW commented on Nov 5, 2015

@aggFTW
Author

Friendly ping :) Have you had a chance to take a look at this?
Thanks!

aggFTW

aggFTW commented on Nov 9, 2015

@aggFTW
Author

Hi,

We want to release a product that relies on the lightning renderer and this could block our shipping of it. We are anxiously waiting for some reply :) I am willing to work on it as long as I can get some guidance.

cc. @ellisonbg @sangeethashekar

Thanks!
Alejandro

mathisonian

mathisonian commented on Nov 9, 2015

@mathisonian
Member

hey @aggFTW, sorry for the delay, I've been pulled away on other projects. It will be a couple days before I can really dig into it, but here is what I would recommend:

When using lightning in the "headless" mode the template that renders the visualization is kept here: https://github.com/lightning-viz/lightning-python/blob/master/lightning/lib/template.html.

I would recommend testing the change using lightning in local mode first and if this works we can apply the same change to the server. You can pass additional parameters to the template by adding to the fields dictionary here: https://github.com/lightning-viz/lightning-python/blob/master/lightning/visualization.py#L151-L160

mathisonian

mathisonian commented on Dec 6, 2015

@mathisonian
Member

Hey @aggFTW, coming back to this - could you help me reproduce?

I'm following these steps:

  1. comment out this function in altair https://github.com/ellisonbg/altair/blob/master/altair/view.py#L102-L115
  2. use this notebook and add cell use_renderer('lightning')
  3. add cell view.create_render_view(v1, shelves=('x','y','color','size'))
  4. render view is displayed
  5. click "render", nothing happens - no js errors or updates on the screen

I'm not sure what else I need to do to see the errors

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ellisonbg@aggFTW@mathisonian

        Issue actions

          Lightning renderer is broken inside ipywidgets.Output · Issue #36 · lightning-viz/lightning-python