voila-dashboards / voila

Voilà turns Jupyter notebooks into standalone web applications
https://voila.readthedocs.io
Other
5.32k stars 497 forks source link

HoloViews Dynamicmap is not working in 0.2.10 #909

Open heng2j opened 3 years ago

heng2j commented 3 years ago

Hi Team,

After we upgraded to version 0.2.10 from 0.2.7, we noticed that our interactive visualization that leveraged DynamicMap is no longer working. And we were able to reproduce this issue with HoloViews' official example.

Commands we have tired

cd ../sample_reports
voila 

cd ../sample_reports
voila --enable_nbextensions=True

Content for a sample notebook to reproduce the Issue

# imports
import numpy as np
import holoviews as hv

# load extension
pn.ipywidget
pn.extension(comms='ipywidgets')

# Official HoloViews DynamicMap demo
frequencies = [0.5, 0.75, 1.0, 1.25]

def sine_curve(phase, freq):
    xvals = [0.1* i for i in range(100)]
    return hv.Curve((xvals, [np.sin(phase+freq*x) for x in xvals]))

# When run live, this cell's output should match the behavior of the GIF below
dmap = hv.DynamicMap(sine_curve, kdims=['phase', 'frequency'])
dmap.redim.range(phase=(0.5,1), frequency=(0.5,1.25))

Looking forward for your advices and solution.

Thank you, Heng

jtpio commented 3 years ago

Thanks @heng2j for the details to reproduce the issue.

we noticed that our interactive visualization that leveraged DynamicMap is no longer working.

By "no longer working", does it mean it doesn't show anymore?

jtpio commented 3 years ago

Also if you have a Binder link somewhere (for example as a gist) with the dependencies to try that example, that would be really useful. That can make it easier to check the issue also happens in a neutral environment.

heng2j commented 3 years ago

Hi @jtpio, thank you for getting back to me. Yes the visualization, the line chart in this case, did not reflect the changes as the user was adjusting the slider.

And I will set something up as an example for you.

heng2j commented 3 years ago

Hi @jtpio, here is the Binder link for debugging. The interaction works fine within the notebook. However when running it as Voila web app, they don't. This is not happening in version 0.2.7

heng2j commented 3 years ago

HI @jtpio, is the demo app from the above Binder link helpful for debugging?

We are currently downgrading to Voila 0.2.7 to address this issue. When you get a chance, please let me know the estimation on how long we should stay in 0.2.7 until the issue is resolved?

heng2j commented 3 years ago

Hi @jtpio. is there any updates? Beside this bug we have observed, from our actual use case, we also observed that even in 0.2.7 the dynamic interactions is not responding if we need to interact with a large dataset (1.5GB+). Perhaps it is related to this issue #627 ?

heng2j commented 2 years ago

Hi @jtpio, is there any update for this issue?

jtpio commented 2 years ago

Hi @heng2j.

Thanks for sharing the Binder link, this is definitely useful :+1:

I haven't had time to look into it yet, but hopefully soon.

heng2j commented 2 years ago

Thank you @jtpio for looking into it. For now, downgrading to 0.2.7 works for us, but still looking forward for the updates.

pmav99 commented 1 year ago

Tested this on 0.3.6 and it is still an issue. I confirm that downgrading to 0.2.7 works.