holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.3k stars 366 forks source link

PanelDeprecationWarning: 'param_value_if_widget' is deprecated and will be removed in version 1.4, use 'transform_reference' instead #1328

Closed dvmorris closed 4 months ago

dvmorris commented 4 months ago

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)

Google Colab datashader==0.16.1 jupyter_bokeh==4.0.4

Description of expected behavior and the observed behavior

Expected behavior: Trying to run this example in Google Colab: https://github.com/holoviz/datashader/blob/main/examples/getting_started/1_Introduction.ipynb

Actual behavior:

The last code snippet produces this warning 100s of times, and no other output

...
/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.
...

Complete, minimal, self-contained example code that reproduces the issue

import holoviews as hv
from holoviews.element.tiles import EsriImagery
from holoviews.operation.datashader import datashade
hv.extension('bokeh')

map_tiles  = EsriImagery().opts(alpha=0.5, width=900, height=480, bgcolor='black')
points     = hv.Points(df, ['dropoff_x', 'dropoff_y'])
taxi_trips = datashade(points, x_sampling=1, y_sampling=1, cmap=cc.fire, width=900, height=480)

map_tiles * taxi_trips

Screenshots or screencasts of the bug in action

image
hoxbro commented 4 months ago

Can you try upgrading holoviews to latest?

dvmorris commented 4 months ago

I was able to get past that issue by upgrading to holoviews==1.18.3 and panel==1.4.2, but now I am running into this issue: https://github.com/holoviz/holoviews/issues/6049

Here is the output of holoviews.show_versions() for reference:

Python              :  3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Operating system    :  Linux-6.1.58+-x86_64-with-glibc2.35
Panel comms         :  default

holoviews           :  1.17.1

bokeh               :  3.3.4
colorcet            :  3.1.0
cudf                :  -
dask                :  2023.8.1
datashader          :  0.16.1
geoviews            :  -
hvplot              :  -
ibis                :  8.0.0
IPython             :  7.34.0
jupyter_bokeh       :  4.0.4
jupyterlab          :  -
matplotlib          :  3.7.1
networkx            :  3.3
notebook            :  6.5.5
numba               :  0.58.1
numpy               :  1.25.2
pandas              :  2.0.3
panel               :  1.3.6
param               :  2.1.0
PIL                 :  9.4.0
plotly              :  5.15.0
pyarrow             :  14.0.2
scipy               :  1.11.4
skimage             :  0.19.3
spatialpandas       :  -
streamz             :  -
xarray              :  2023.7.0
hoxbro commented 4 months ago

The show_versions looks wrong. You should have holoviews 1.18.3 not 1.17.1.

For the other issue, I can see it works if you wrap the output in pn.panel:

image

I will close this issue, as this is not a datashader problem but more likely a holoviews / panel problem.

dvmorris commented 4 months ago

Thank you, wrapping in a panel seems to be working for me.