AlonKellner / waloviz

An open source interactive spectrogram audio player, primarily based on bokeh and the holoviz stack (wav+holoviz=waloviz)
MIT License
65 stars 1 forks source link

Colab Warnings when using ``wv.Audio`` #8

Closed AlonKellner closed 3 months ago

AlonKellner commented 3 months ago

Background

Whenever using wv.Audio in a Colab notebook, there are four warnings

/usr/local/lib/python3.10/dist-packages/holoviews/core/util.py:1585: PanelDeprecationWarning: 'param_value_if_widget' is deprecated and will be removed in version 1.4, use 'transform_reference' instead.
  value = param_value_if_widget(value)
/usr/local/lib/python3.10/dist-packages/holoviews/core/util.py:1585: PanelDeprecationWarning: 'param_value_if_widget' is deprecated and will be removed in version 1.4, use 'transform_reference' instead.
  value = param_value_if_widget(value)
/usr/local/lib/python3.10/dist-packages/holoviews/plotting/bokeh/plot.py:987: UserWarning: found multiple competing values for 'toolbar.active_drag' property; using the latest value
  layout_plot = gridplot(
/usr/local/lib/python3.10/dist-packages/holoviews/plotting/bokeh/plot.py:987: UserWarning: found multiple competing values for 'toolbar.active_scroll' property; using the latest value
  layout_plot = gridplot(

For an example, see https://colab.research.google.com/drive/1euQCxaNlTg0pGvXz6d7RSoDhM3B1k7dy?usp=sharing

Recommended Prior Knowledge

Suggestion

About the first two I'm not actually sure what to make of them, probably something internal to holoviews because we don't use holoviews.core.util directly. Further investigation is needed.
The two latter warnings seem to be related to the active_tools, which is set in a not very careful way right now where all tools are added to the active_tools, this is probably an easy fix in the combine_player_plots function in src/waloviz/_holoviews_manipulations.py, keep only initially active tools in the active_tools, which are the "pan" and "wheel_zoom'.

AlonKellner commented 3 months ago

Currently this does not happen anymore in the colab demo: https://colab.research.google.com/drive/1euQCxaNlTg0pGvXz6d7RSoDhM3B1k7dy?usp=sharing Probably due to new panel and holoviews versions, I'll go ahead and close this issue 😄