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

datashader and rasterize=True not updating all layers #5595

Open
jmakov opened this issue Jan 18, 2023 · 10 comments · May be fixed by #5766
Open

datashader and rasterize=True not updating all layers #5595

jmakov opened this issue Jan 18, 2023 · 10 comments · May be fixed by #5766
Assignees
Labels
type: bug Something isn't correct or isn't working

Comments

@jmakov
Copy link

jmakov commented Jan 18, 2023

ALL software version info

pip freeze output:

aiosignal==1.2.0 attrs==21.2.0 Automat==20.2.0 Babel==2.8.0 bcrypt==3.2.0 blinker==1.4 certifi==2020.6.20 cffi==1.15.1 chardet==4.0.0 click==8.0.3 cloud-init==22.4.2 colorama==0.4.4 command-not-found==0.3 configobj==5.0.6 constantly==15.1.0 cryptography==3.4.8 dbus-python==1.2.18 distlib==0.3.6 distro==1.7.0 distro-info===1.1build1 fabric==2.7.1 fabric2==2.7.1 filelock==3.8.0 frozenlist==1.3.1 grpcio==1.43.0 httplib2==0.20.2 hyperlink==21.0.0 idna==3.3 importlib-metadata==4.6.4 incremental==21.3.0 invoke==1.7.3 jeepney==0.7.1 Jinja2==3.0.3 jsonpatch==1.32 jsonpointer==2.0 jsonschema==3.2.0 keyring==23.5.0 launchpadlib==1.10.16 lazr.restfulclient==0.14.4 lazr.uri==1.0.6 MarkupSafe==2.0.1 more-itertools==8.10.0 msgpack==1.0.4 netifaces==0.11.0 numpy==1.23.3 oauthlib==3.2.0 paramiko==2.12.0 pathlib2==2.3.7.post1 pexpect==4.8.0 platformdirs==2.5.2 protobuf==3.20.3 psutil==5.9.0 ptyprocess==0.7.0 pyasn1==0.4.8 pyasn1-modules==0.2.1 pycparser==2.21 PyGObject==3.42.1 PyHamcrest==2.0.2 PyJWT==2.3.0 pyOpenSSL==21.0.0 pyparsing==2.4.7 pyrsistent==0.18.1 pyserial==3.5 python-apt==2.3.0+ubuntu2.1 python-debian===0.1.43ubuntu1 python-magic==0.4.24 pytz==2022.1 PyYAML==5.4.1 ray-cpp==2.0.0 requests==2.25.1 s-tui==1.1.3 SecretStorage==3.3.1 service-identity==18.1.0 six==1.16.0 sos==4.4 ssh-import-id==5.11 systemd-python==234 Twisted==22.1.0 ubuntu-advantage-tools==27.12 ufw==0.36.1 urllib3==1.26.5 urwid==2.1.2 virtualenv==20.16.5 wadllib==1.3.6 zipp==1.0.0 zope.interface==5.4.0

conda list:

# packages in environment at /home/toaster/mambaforge-pypy3/envs/puma-lab: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge aiohttp 3.8.3 py39hb9d737c_1 conda-forge aiohttp-retry 2.8.3 pyhd8ed1ab_0 conda-forge aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge amqp 5.1.1 pyhd8ed1ab_0 conda-forge antlr4-python3-runtime 4.11.1 pypi_0 pypi anyio 3.6.2 pyhd8ed1ab_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py39hb9d737c_3 conda-forge arrow-cpp 10.0.1 h27aab58_3_cpu conda-forge asttokens 2.2.1 pypi_0 pypi async-timeout 4.0.2 pyhd8ed1ab_0 conda-forge asyncssh 2.13.0 pyhd8ed1ab_0 conda-forge atk-1.0 2.38.0 hd4edc92_1 conda-forge atpublic 3.0.1 pyhd8ed1ab_0 conda-forge attrs 22.2.0 pyh71513ae_0 conda-forge aws-c-auth 0.6.21 h774e2f3_1 conda-forge aws-c-cal 0.5.20 hff2c3d7_3 conda-forge aws-c-common 0.8.5 h166bdaf_0 conda-forge aws-c-compression 0.2.16 hf5f93bc_0 conda-forge aws-c-event-stream 0.2.17 h52dae97_0 conda-forge aws-c-http 0.6.29 hf21410f_0 conda-forge aws-c-io 0.13.11 h4f448d1_2 conda-forge aws-c-mqtt 0.7.13 hefb3e95_10 conda-forge aws-c-s3 0.2.1 h927de71_2 conda-forge aws-c-sdkutils 0.1.7 hf5f93bc_0 conda-forge aws-checksums 0.1.14 h6027aba_0 conda-forge aws-crt-cpp 0.18.16 ha7c8eef_6 conda-forge aws-sdk-cpp 1.9.379 h32f6703_7 conda-forge babel 2.11.0 pypi_0 pypi backcall 0.2.0 pypi_0 pypi backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge bcrypt 4.0.1 pypi_0 pypi beautifulsoup4 4.11.1 pyha770c72_0 conda-forge billiard 3.6.4.0 py39hb9d737c_3 conda-forge bleach 5.0.1 pyhd8ed1ab_0 conda-forge blessed 1.19.1 pypi_0 pypi bokeh 2.4.3 pyhd8ed1ab_3 conda-forge brotli 1.0.9 h166bdaf_8 conda-forge brotli-bin 1.0.9 h166bdaf_8 conda-forge brotlipy 0.7.0 py39hb9d737c_1005 conda-forge bzip2 1.0.8 hb9a14ef_9 intel c-ares 1.18.1 h7f98852_0 conda-forge ca-certificates 2022.12.7 ha878542_0 conda-forge cachetools 5.2.1 pypi_0 pypi cairo 1.16.0 ha61ee94_1014 conda-forge celery 5.2.7 pyhd8ed1ab_0 conda-forge certifi 2022.12.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py39he91dace_3 conda-forge charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge click 8.1.3 unix_pyhd8ed1ab_2 conda-forge click-didyoumean 0.3.0 pyhd8ed1ab_0 conda-forge click-plugins 1.1.1 py_0 conda-forge click-repl 0.2.0 pyhd8ed1ab_0 conda-forge cloudpickle 2.2.0 pyhd8ed1ab_0 conda-forge cmdstanpy 1.0.8 pypi_0 pypi colorama 0.4.6 pyhd8ed1ab_0 conda-forge colorcet 3.0.1 pyhd8ed1ab_0 conda-forge colorful 0.5.5 pypi_0 pypi comm 0.1.2 pypi_0 pypi commonmark 0.9.1 py_0 conda-forge configobj 5.0.6 py_0 conda-forge contourpy 1.0.6 py39hf939315_0 conda-forge convertdate 2.4.0 pypi_0 pypi cryptography 39.0.0 py39h079d5ae_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge daal4py 2023.0.0 py39_intel_25395 intel dal 2023.0.0 intel_25395 intel dask-core 2022.12.1 pyhd8ed1ab_0 conda-forge dataclasses 0.8 pyhc8e2a94_3 conda-forge datashader 0.14.3 pyh1a96a4e_0 conda-forge datashape 0.5.4 py_1 conda-forge debugpy 1.6.5 pypi_0 pypi decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge dictdiffer 0.9.0 pyhd8ed1ab_0 conda-forge diskcache 5.4.0 pyhd8ed1ab_0 conda-forge distlib 0.3.6 pypi_0 pypi distro 1.6.0 pyhd8ed1ab_0 conda-forge dpath 2.1.3 py39hf3d152e_0 conda-forge dpcpp-cpp-rt 2022.2.1 intel_16953 intel dpcpp_cpp_rt 2023.0.0 intel_25370 intel duckdb 0.6.1 pypi_0 pypi dulwich 0.20.50 py39h72bdee0_0 conda-forge dvc 2.38.1 pyhd8ed1ab_0 conda-forge dvc-data 0.28.4 pyhd8ed1ab_0 conda-forge dvc-http 2.27.2 pyhd8ed1ab_0 conda-forge dvc-objects 0.14.0 pyhd8ed1ab_0 conda-forge dvc-render 0.0.15 pyhd8ed1ab_0 conda-forge dvc-ssh 2.20.0 pyhd8ed1ab_0 conda-forge dvc-task 0.1.8 pyhd8ed1ab_0 conda-forge dvclive 1.3.0 pyhd8ed1ab_0 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge ephem 4.1.4 pypi_0 pypi exceptiongroup 1.1.0 pypi_0 pypi executing 1.2.0 pypi_0 pypi expat 2.5.0 h27087fc_0 conda-forge filelock 3.9.0 pyhd8ed1ab_0 conda-forge flatten-dict 0.4.2 pyhd8ed1ab_1 conda-forge flit-core 3.8.0 pyhd8ed1ab_0 conda-forge flufl.lock 7.1 pyhd8ed1ab_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.1 hc2a2eb6_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.38.0 py39hb9d737c_1 conda-forge fortran_rt 2023.0.0 intel_25370 intel freetype 2.12.1 hca18f0e_1 conda-forge fribidi 1.0.10 h36c2ea0_0 conda-forge frozenlist 1.3.3 py39hb9d737c_0 conda-forge fs 2.4.16 pypi_0 pypi fsspec 2022.11.0 pyhd8ed1ab_0 conda-forge funcy 1.17 pyhd8ed1ab_0 conda-forge future 0.18.2 pyhd8ed1ab_6 conda-forge gdk-pixbuf 2.42.10 h05c8ddd_0 conda-forge gettext 0.21.1 h27087fc_0 conda-forge gflags 2.2.2 he1b5a44_1004 conda-forge giflib 5.2.1 h36c2ea0_2 conda-forge gitdb 4.0.10 pyhd8ed1ab_0 conda-forge gitpython 3.1.30 pyhd8ed1ab_0 conda-forge glog 0.6.0 h6f12383_0 conda-forge google-auth 2.15.0 pypi_0 pypi googleapis-common-protos 1.57.1 pypi_0 pypi gpustat 1.0.0 pypi_0 pypi grandalf 0.6 py_0 conda-forge graphite2 1.3.13 h58526e2_1001 conda-forge graphviz 7.0.6 h2e5815a_0 conda-forge greenlet 2.0.1 pypi_0 pypi grpcio 1.51.1 pypi_0 pypi gtk2 2.24.33 h90689f9_2 conda-forge gts 0.7.6 h64030ff_2 conda-forge harfbuzz 6.0.0 h8e241bc_0 conda-forge hijri-converter 2.2.4 pypi_0 pypi holidays 0.18 pypi_0 pypi holoviews 1.15.3 pyhd8ed1ab_0 conda-forge hvplot 0.8.2 pyhd8ed1ab_0 conda-forge hydra-core 1.3.1 pyhd8ed1ab_0 conda-forge icc_rt 2022.2.1 intel_16953 intel icu 70.1 h27087fc_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge impi_rt 2021.8.0 intel_25329 intel importlib-metadata 6.0.0 pyha770c72_0 conda-forge importlib_resources 5.10.2 pyhd8ed1ab_0 conda-forge iniconfig 2.0.0 pypi_0 pypi intel-cmplr-lib-rt 2022.2.1 intel_16953 intel intel-cmplr-lic-rt 2022.2.1 intel_16953 intel intel-fortran-rt 2022.2.1 intel_16953 intel intel-opencl-rt 2022.2.1 intel_16953 intel intel-openmp 2022.2.1 intel_16953 intel intelpython 2023.0.0 1 intel invoke 1.7.3 pypi_0 pypi ipykernel 6.19.4 pypi_0 pypi ipython 8.8.0 pypi_0 pypi ipython-genutils 0.2.0 pypi_0 pypi ipywidgets 8.0.4 pypi_0 pypi iterative-telemetry 0.0.6 pyhd8ed1ab_0 conda-forge jedi 0.18.2 pypi_0 pypi jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.0.1 pyh3f38642_3 intel jpeg 9e h166bdaf_2 conda-forge json5 0.9.11 pypi_0 pypi jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge jupyter-contrib-core 0.4.2 pypi_0 pypi jupyter-contrib-nbextensions 0.7.0 pypi_0 pypi jupyter-highlight-selected-word 0.2.0 pypi_0 pypi jupyter-nbextensions-configurator 0.6.1 pypi_0 pypi jupyter-resource-usage 0.7.0 pyhd8ed1ab_0 conda-forge jupyter_client 7.4.8 pyhd8ed1ab_0 conda-forge jupyter_core 5.1.2 py39hf3d152e_0 conda-forge jupyter_server 1.23.4 pyhd8ed1ab_0 conda-forge jupyterlab 3.5.2 pypi_0 pypi jupyterlab-execute-time 2.3.1 pypi_0 pypi jupyterlab-server 2.18.0 pypi_0 pypi jupyterlab-widgets 3.0.5 pypi_0 pypi jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge kiwisolver 1.4.4 py39hf939315_1 conda-forge kombu 5.2.4 py39hf3d152e_2 conda-forge korean-lunar-calendar 0.3.1 pypi_0 pypi krb5 1.20.1 h81ceb04_0 conda-forge lckr-jupyterlab-variableinspector 3.0.9 pypi_0 pypi lcms2 2.14 hfd0df8a_1 conda-forge ld_impl_linux-64 2.39 hcc3a1bd_1 conda-forge lerc 4.0.0 h27087fc_0 conda-forge libabseil 20220623.0 cxx17_h05df665_6 conda-forge libarrow 10.0.1 hd014966_3_cpu conda-forge libblas 3.9.0 16_linux64_mkl conda-forge libbrotlicommon 1.0.9 h166bdaf_8 conda-forge libbrotlidec 1.0.9 h166bdaf_8 conda-forge libbrotlienc 1.0.9 h166bdaf_8 conda-forge libcrc32c 1.1.2 h9c3ff4c_0 conda-forge libcurl 7.87.0 hdc1c0ab_0 conda-forge libdeflate 1.14 h166bdaf_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libevent 2.1.10 h28343ad_4 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 12.2.0 h65d4601_19 conda-forge libgd 2.3.3 h5aea950_4 conda-forge libgit2 1.5.0 hdb3ecda_1 conda-forge libglib 2.74.1 h606061b_1 conda-forge libgomp 12.2.0 h65d4601_19 conda-forge libgoogle-cloud 2.5.0 h21dfe5b_1 conda-forge libgrpc 1.51.1 h30feacc_0 conda-forge libiconv 1.17 h166bdaf_0 conda-forge libjpeg-turbo 2.1.4 h166bdaf_0 conda-forge libllvm11 11.1.0 he0ac6c6_5 conda-forge libnghttp2 1.51.0 hff17c54_0 conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libpng 1.6.39 h753d276_0 conda-forge libprotobuf 3.21.12 h3eb15da_0 conda-forge librsvg 2.54.4 h7abd40a_0 conda-forge libsodium 1.0.18 h36c2ea0_1 conda-forge libsqlite 3.40.0 h753d276_0 conda-forge libssh2 1.10.0 hf14f497_3 conda-forge libstdcxx-ng 12.2.0 h46fd767_19 conda-forge libta-lib 0.4.0 h166bdaf_1 conda-forge libthrift 0.16.0 he500d00_2 conda-forge libtiff 4.5.0 h82bc61c_0 conda-forge libtool 2.4.7 h27087fc_0 conda-forge libutf8proc 2.8.0 h166bdaf_0 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libuv 1.44.2 h166bdaf_0 conda-forge libwebp 1.2.4 h1daa5a0_1 conda-forge libwebp-base 1.2.4 h166bdaf_0 conda-forge libxcb 1.13 h7f98852_1004 conda-forge libxml2 2.10.3 h7463322_0 conda-forge libzlib 1.2.13 h166bdaf_4 conda-forge llvmlite 0.39.1 py39h7d9a04d_1 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge lunarcalendar 0.0.9 pypi_0 pypi lxml 4.9.2 pypi_0 pypi lz4-c 1.9.3 h9c3ff4c_1 conda-forge markdown 3.4.1 pyhd8ed1ab_0 conda-forge markupsafe 2.1.1 py39hb9d737c_2 conda-forge matplotlib-base 3.6.2 py39hf9fd14e_0 conda-forge matplotlib-inline 0.1.6 pypi_0 pypi mistune 2.0.4 pyhd8ed1ab_0 conda-forge mizar-labs 0.2.3 pypi_0 pypi mkl 2022.2.1 intel_16993 intel mkl-service 2.4.0 py39h7634626_12 intel mkl_fft 1.3.1 py39h1909d4f_16 intel mkl_random 1.2.2 py39h94ca54a_16 intel mkl_umath 0.1.1 py39h0348192_26 intel msgpack 1.0.4 pypi_0 pypi multidict 6.0.4 py39h72bdee0_0 conda-forge multipledispatch 0.6.0 py_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge nanotime 0.5.2 py_0 conda-forge nb_conda_kernels 2.3.1 py39hf3d152e_2 conda-forge nbclassic 0.4.8 pypi_0 pypi nbclient 0.7.2 pyhd8ed1ab_0 conda-forge nbconvert-core 7.2.7 pyhd8ed1ab_0 conda-forge nbformat 5.7.1 pyhd8ed1ab_0 conda-forge ncurses 6.3 h5eee18b_3 intel nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge networkx 3.0 pyhd8ed1ab_0 conda-forge nodejs 18.12.1 h8839609_0 conda-forge notebook 6.5.2 pypi_0 pypi notebook-shim 0.2.2 pypi_0 pypi numba 0.56.4 py39h61ddf18_0 conda-forge numpy 1.21.4 py39h8dc10e9_16 intel numpy-base 1.21.4 py39h97bc315_16 intel nvidia-ml-py 11.495.46 pypi_0 pypi omegaconf 2.3.0 pyhd8ed1ab_0 conda-forge opencensus-context 0.1.3 pypi_0 pypi openjpeg 2.5.0 hfec8fc6_2 conda-forge openssl 3.0.7 h0b41bf4_1 conda-forge orc 1.8.1 hfdbbad2_0 conda-forge packaging 22.0 pyhd8ed1ab_0 conda-forge pandas 1.5.2 py39h4661b88_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge panel 0.14.2 pyhd8ed1ab_0 conda-forge pango 1.50.12 hd33c08f_1 conda-forge param 1.12.3 pyh1a96a4e_0 conda-forge parquet-cpp 1.5.1 2 conda-forge parso 0.8.3 pypi_0 pypi partd 1.3.0 pyhd8ed1ab_0 conda-forge pathlib2 2.3.7.post1 py39hf3d152e_2 conda-forge pathspec 0.9.0 pyhd8ed1ab_0 conda-forge patsy 0.5.3 pyhd8ed1ab_0 conda-forge pcre2 10.40 hc3806b6_0 conda-forge pexpect 4.8.0 pypi_0 pypi pickleshare 0.7.5 pypi_0 pypi pillow 9.4.0 py39ha08a7e4_0 conda-forge pip 22.3.1 pypi_0 pypi pixman 0.40.0 h36c2ea0_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge platformdirs 2.6.2 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 pypi_0 pypi prometheus-client 0.13.1 pypi_0 pypi prometheus_client 0.15.0 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.36 pyha770c72_0 conda-forge prompt_toolkit 3.0.36 hd8ed1ab_0 conda-forge prophet 1.1.1 pypi_0 pypi protobuf 4.21.12 pypi_0 pypi psutil 5.9.4 py39hb9d737c_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge puma-lab 0.1 dev_0 pure-eval 0.2.2 pypi_0 pypi py-spy 0.3.14 pypi_0 pypi pyarrow 7.0.0 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pycparser 2.21 pyhd8ed1ab_0 conda-forge pyct 0.4.6 py_0 conda-forge pyct-core 0.4.6 py_0 conda-forge pydantic 1.10.4 pypi_0 pypi pydot 1.4.2 py39hf3d152e_3 conda-forge pygit2 1.11.1 py39h72bdee0_1 conda-forge pygments 2.14.0 pyhd8ed1ab_0 conda-forge pygtrie 2.5.0 pyhd8ed1ab_0 conda-forge pymeeus 0.5.12 pypi_0 pypi pynacl 1.5.0 pypi_0 pypi pyopenssl 23.0.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyrsistent 0.19.3 py39h72bdee0_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 7.2.0 pypi_0 pypi python 3.9.15 hba424b6_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.16.2 pyhd8ed1ab_0 conda-forge python-gssapi 1.8.2 py39h47eb580_2 conda-forge python_abi 3.9 3_cp39 conda-forge pytz 2022.7 pyhd8ed1ab_0 conda-forge pyviz_comms 2.2.1 pyhd8ed1ab_1 conda-forge pywin32-on-windows 0.1.0 pyh1179c8e_3 conda-forge pyyaml 6.0 py39hb9d737c_5 conda-forge pyzmq 24.0.1 py39headdf64_1 conda-forge ray 2.2.0 pypi_0 pypi re2 2022.06.01 h27087fc_1 conda-forge readline 8.2 h5eee18b_0 intel requests 2.28.1 pyhd8ed1ab_1 conda-forge rich 13.0.1 pyhd8ed1ab_0 conda-forge rsa 4.9 pypi_0 pypi ruamel.yaml 0.17.21 py39hb9d737c_2 conda-forge ruamel.yaml.clib 0.2.7 py39h72bdee0_1 conda-forge s2n 1.3.30 h3358134_0 conda-forge scikit-learn 1.1.1 py39h6a678d6_0 intel scikit-learn-intelex 2023.0.0 py39_intel_25395 intel scipy 1.7.3 py39hac29846_2 intel scmrepo 0.1.4 pyhd8ed1ab_0 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 65.6.3 pypi_0 pypi setuptools-git 1.2 pypi_0 pypi shortuuid 1.0.11 pyhd8ed1ab_0 conda-forge shtab 1.5.8 pyhd8ed1ab_0 conda-forge six 1.16.0 pyhd3eb1b0_1 intel smart-open 6.3.0 pypi_0 pypi smmap 3.0.5 pyh44b312d_0 conda-forge snappy 1.1.9 hbd366e4_2 conda-forge sniffio 1.3.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sqlalchemy 1.4.46 pypi_0 pypi sqlglot 10.4.3 pypi_0 pypi sqlite 3.40.0 h5082296_0 intel sshfs 2022.6.0 pyhd8ed1ab_1 conda-forge stack-data 0.6.2 pypi_0 pypi statsmodels 0.13.5 py39h2ae25f5_2 conda-forge ta-lib 0.4.19 py39hd257fcd_4 conda-forge tabulate 0.9.0 pyhd8ed1ab_1 conda-forge tbb 2021.8.0 intel_25334 intel tbb4py 2021.8.0 py39_intel_25334 intel terminado 0.17.1 pyh41d4057_0 conda-forge threadpoolctl 2.2.0 pyh0d69192_0 intel tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge tk 8.6.12 h1ccaba5_0 intel tomli 2.0.1 pypi_0 pypi tomlkit 0.11.6 pyha770c72_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.2 py39hb9d737c_1 conda-forge tqdm 4.64.1 pyhd8ed1ab_0 conda-forge traitlets 5.8.0 pyhd8ed1ab_0 conda-forge triad 0.8.0 pypi_0 pypi typing 3.10.0.0 pyhd8ed1ab_0 conda-forge typing-extensions 4.4.0 hd8ed1ab_0 conda-forge typing_extensions 4.4.0 pyha770c72_0 conda-forge tzdata 2022g h191b570_0 conda-forge unicodedata2 15.0.0 py39hb9d737c_0 conda-forge urllib3 1.26.13 pyhd8ed1ab_0 conda-forge vine 5.0.0 pyhd8ed1ab_1 conda-forge virtualenv 20.17.1 pypi_0 pypi voluptuous 0.13.1 pyhd8ed1ab_0 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.4.2 pyhd8ed1ab_0 conda-forge wheel 0.37.1 pyhd3eb1b0_0 intel widgetsnbextension 4.0.5 pypi_0 pypi xarray 2022.12.0 pyhd8ed1ab_0 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.0.10 h7f98852_0 conda-forge xorg-libsm 1.2.3 hd9c2040_1000 conda-forge xorg-libx11 1.7.2 h7f98852_0 conda-forge xorg-libxau 1.0.9 h7f98852_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h7f98852_1 conda-forge xorg-libxrender 0.9.10 h7f98852_1003 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h7f98852_1002 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.6 h5eee18b_0 intel yaml 0.2.5 h7f98852_2 conda-forge yarl 1.8.2 py39hb9d737c_0 conda-forge zc.lockfile 2.0 pyhd8ed1ab_1 conda-forge zeromq 4.3.4 h9c3ff4c_1 conda-forge zipp 3.11.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 h166bdaf_4 conda-forge zstd 1.5.2 h6239696_4 conda-forge

Description of expected behavior and the observed behavior

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

import hvplot.pandas
import pandas
pandas.options.plotting.backend = "holoviews"

# doesn't work (pic below)
pandas.DataFrame({"a": [i for i in range(10_000)], "b": [i for i in range(2, 10_002)]}).plot(datashade=True) * pandas.DataFrame({"c": [i for i in range(3, 10_003)], "d": [i for i in range(4, 10_004)]}).plot(datashade=True, cmap="greys")

# this works as expected (on zoom all layers are updated)
pandas.DataFrame({"a": [i for i in range(10_000)]}).plot(datashade=True) \
* pandas.DataFrame({"b": [i for i in range(2, 10_002)]}).plot(datashade=True) \
* pandas.DataFrame({"c": [i for i in range(3, 10_003)]}).plot(datashade=True, cmap="greys") \
* pandas.DataFrame({"d": [i for i in range(4, 10_004)]}).plot(datashade=True, cmap="greys")

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

image

@jbednar
Copy link
Member

jbednar commented Jan 19, 2023

I can reproduce an issue using these versions:

holoviews=1.14.8
hvplot=0.8.1
datashader=0.14.3
pandas=1.4.4

and this code:

import hvplot.pandas
import pandas
pandas.options.plotting.backend = "holoviews"

pandas.DataFrame({"a": [ i      for i in range(   10_000)], 
                  "b": [ i-2000 for i in range(2, 10_002)]}).plot(datashade=True) * \
pandas.DataFrame({"c": [-i-4000 for i in range(3, 10_003)], 
                  "d": [-i-6000 for i in range(4, 10_004)]}).plot(datashade=True)

if I zoom in and out a bit. It works at first, but then hits a datashader error and fails to update one of the traces:

ython callback returned following output: 
	Traceback (most recent call last):
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/plotting/util.py", line 277, in get_plot_frame
	    return map_obj[key]
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 1344, in __getitem__
	    val = self._execute_callback(*tuple_key)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 1111, in _execute_callback
	    retval = self.callback(*args, **kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 677, in __call__
	    if not args and not kwargs and not any(kwarg_hash): return self.callable()
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 210, in dynamic_mul
	    self_el = self.select(HoloMap, **key_map) if self.kdims else self[()]
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 1344, in __getitem__
	    val = self._execute_callback(*tuple_key)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 1111, in _execute_callback
	    retval = self.callback(*args, **kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 708, in __call__
	    ret = self.callable(*args, **kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/util/__init__.py", line 1043, in dynamic_operation
	    key, obj = resolve(key, kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/util/__init__.py", line 1032, in resolve
	    return key, map_obj[key]
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 1344, in __getitem__
	    val = self._execute_callback(*tuple_key)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 1111, in _execute_callback
	    retval = self.callback(*args, **kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/spaces.py", line 708, in __call__
	    ret = self.callable(*args, **kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/util/__init__.py", line 1044, in dynamic_operation
	    return apply(obj, *key, **kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/util/__init__.py", line 1036, in apply
	    processed = self._process(element, key, kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/util/__init__.py", line 1018, in _process
	    return self.p.operation.process_element(element, key, **kwargs)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/operation.py", line 194, in process_element
	    return self._apply(element, key)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/core/operation.py", line 141, in _apply
	    ret = self._process(element, key)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/operation/datashader.py", line 1536, in _process
	    shaded = shade._process(self, agg, key)
	  File "/Users/jbednar/miniconda3/envs/holoviz/lib/python3.8/site-packages/holoviews/operation/datashader.py", line 1367, in _process
	    img = tf.shade(array, **shade_opts)
	  File "/Users/jbednar/datashader/datashader/transfer_functions/__init__.py", line 694, in shade
	    return _colorize(agg, color_key, how, alpha, span, min_alpha, name, color_baseline, rescale_discrete_levels)
	  File "/Users/jbednar/datashader/datashader/transfer_functions/__init__.py", line 409, in _colorize
	    a = _interpolate_alpha(data, total, mask, how, alpha, span, min_alpha, rescale_discrete_levels)
	  File "/Users/jbednar/datashader/datashader/transfer_functions/__init__.py", line 447, in _interpolate_alpha
	    a_scaled = _normalize_interpolate_how(how)(total - offset, mask)
	  File "/Users/jbednar/datashader/datashader/transfer_functions/__init__.py", line 193, in eq_hist
	    cdf = cdf / float(cdf[-1])
	IndexError: index -1 is out of bounds for axis 0 with size 0

@ianthomas23
Copy link
Member

Problem identified in datashader as issue holoviz/datashader#1166.

@hoxbro
Copy link
Member

hoxbro commented Jan 19, 2023

There is another problem related to NdOverlay and datashade. I'm using @ianthomas23 fix and main branch of holoviews.

import holoviews as hv
import numpy as np
from holoviews.operation.datashader import datashade

hv.extension("bokeh")

data = np.arange(10_000)

p1 = hv.Curve(data)
p2 = hv.Curve(data - 1000)
p3 = hv.Curve(-data)
p4 = hv.Curve(-data - 1000)

o1 = hv.Overlay([p1, p2])
o2 = hv.Overlay([p3, p4])
o = datashade(o1, cmap="blue") * datashade(o2, cmap="red")

nd1 = hv.NdOverlay({"p1": p1, "p2": p2})
nd2 = hv.NdOverlay({"p3": p3, "p4": p4})
nd = datashade(nd1, cmap="blue") * datashade(nd2, cmap="red")

o.opts(title="Overlay == works") + nd.opts(title="NdOverlay != works")

image

image

@hoxbro hoxbro added the type: bug Something isn't correct or isn't working label Jan 19, 2023
@jbednar
Copy link
Member

jbednar commented Jan 19, 2023

@hoxbro , I can reproduce that problem as well, but in this case, I don't see any errors in the JS console, so I can't assign the problem to Datashader this time. Is there thus a problem in HoloViews as well?

@hoxbro
Copy link
Member

hoxbro commented Jan 20, 2023

Is there thus a problem in HoloViews as well?

I think the problem is in Holoviews.

@jlstevens
Copy link
Contributor

After looking into it, it looks to me like the issue is in the dynamicmap created by * as the individual datashaded NdOverlays work fine. Note that this issue is reproducible with aggregate so it isn't specific to the datashade operation.

My suspicion is that the bug is in how operation callbacks try to merge their streams when overlayed.

@maximlt
Copy link
Member

maximlt commented Jan 27, 2023

Just reporting some small progress. Inspecting source_streams defined in the ElementPlot shows that the last element inspected has none, which we suspect shows the outcome of the bug.

Code to reproduce:

import holoviews as hv
import numpy as np
from holoviews.operation.datashader import datashade
import panel as pn

hv.extension("bokeh")

data = np.arange(10_000)
op = datashade

p1 = hv.Curve(data)
p2 = hv.Curve(data - 1000)
p3 = hv.Curve(-data)
p4 = hv.Curve(-data - 1000)

nd1 = hv.NdOverlay({"p1": p1, "p2": p2})
nd2 = hv.NdOverlay({"p3": p3, "p4": p4})
dnd1 = op(nd1, cmap='blue')
dnd2 = op(nd2, cmap='red')
nd = dnd1 * dnd2
hv.render(nd)

Diff to apply:

diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py
index cba14bb70..999b51deb 100644
--- a/holoviews/plotting/bokeh/element.py
+++ b/holoviews/plotting/bokeh/element.py
@@ -208,6 +208,11 @@ class ElementPlot(BokehPlot, GenericElementPlot):
         self.handles = {} if plot is None else self.handles['plot']
         self.static = len(self.hmap) == 1 and len(self.keys) == len(self.hmap)
         self.callbacks, self.source_streams = self._construct_callbacks()
+        print('element:')
+        print(element)
+        print('source_streams:')
+        print(self.source_streams)
+        print()
         self.static_source = False

Output:

element:
:DynamicMap   []
   :Overlay
      .RGB.I  :RGB   [x,y]   (R,G,B,A)
      .RGB.II :RGB   [x,y]   (R,G,B,A)
source_streams:
[]

element:
:DynamicMap   []
   :RGB   [x,y]   (R,G,B,A)
source_streams:
[RangeXY(x_range=None,y_range=None), PlotSize(height=400,scale=1.0,width=400)]

element:
:DynamicMap   []
   :RGB   [x,y]   (R,G,B,A)
source_streams:
[]

Suspecting this has nothing to do with compute_overlayable_zorders, not based on any other evidence that this is a complex part of the code this has to go through.

@maximlt
Copy link
Member

maximlt commented Feb 10, 2023

We did some more digging. Running the following script:

import holoviews as hv
import numpy as np

from holoviews.operation.datashader import datashade

hv.extension("bokeh")

data = np.arange(10_000)
op = datashade

c1 = hv.Curve(data, label='c1')
c2 = hv.Curve(data - 500, label='c2')
c3 = hv.Curve(data - 1000, label='c3')
c4 = hv.Curve(-data, label='c4')
c5 = hv.Curve(-data - 500, label='c5')

# Build the NDOverlays
nda = hv.NdOverlay({"c1": c1, "c2": c2, "c3": c3}, label='ndA')  # 3 curves
ndb = hv.NdOverlay({"c4": c4, "c5": c5}, label='ndB')            # 2 curves
# Apply operation on the NdOverlays
dnda = op(nda, cmap='blue')
dndb = op(ndb, cmap='red')
# Create overlay of previous operation ouputs
ov = dnda * dndb
# Render
hv.render(ov)

with these changes:

diff --git a/holoviews/plotting/plot.py b/holoviews/plotting/plot.py
index 0a2ebbe07..8ebc8a1ce 100644
--- a/holoviews/plotting/plot.py
+++ b/holoviews/plotting/plot.py
@@ -1178,6 +1178,10 @@ class GenericElementPlot(DimensionedPlot):
             self.stream_sources = stream_sources
         else:
             self.stream_sources = compute_overlayable_zorders(self.hmap)
+            print('Sources of element\n', element, end='\n')
+            from pprint import pprint
+            s = dict(self.stream_sources)
+            pprint({k: [f'{type(v).__name__}[{v.label!r}]' for v in s[k]] for k in s})
 
         plot_element = self.hmap.last
         if self.batched and not isinstance(self, GenericOverlayPlot):
@@ -1652,6 +1656,7 @@ class GenericOverlayPlot(GenericElementPlot):
         # Get zorder and style counter
         length = self.style_grouping
         group_key = style_key[:length]
+        print('self.zorder:', self.zorder, 'oidx:', oidx, 'offset:', self.zoffset)
         zorder = self.zorder + oidx + self.zoffset
         cyclic_index = self.group_counter[group_key]
         self.cyclic_index_lookup[style_key] = cyclic_index
@@ -1688,6 +1693,7 @@ class GenericOverlayPlot(GenericElementPlot):
                         stream_sources=self.stream_sources,
                         projection=self.projection, fontscale=self.fontscale,
                         zorder=zorder, root=self.root, **passed_handles)
+        print('plottype', plottype, 'zorder', zorder)
         return plottype(obj, **plotopts)

prints:

Sources of element
 :DynamicMap   []
   :Overlay
      .RGB.C1 :RGB   [x,y]   (R,G,B,A)
      .RGB.C4 :RGB   [x,y]   (R,G,B,A)
{0: ["DynamicMap['c1']", "Curve['c1']", "NdOverlay['ndA']"],
 1: ["Curve['c2']", "NdOverlay['ndA']"],
 2: ["Curve['c3']", "NdOverlay['ndA']"],
 3: ["DynamicMap['c4']", "Curve['c4']", "NdOverlay['ndB']"],
 4: ["Curve['c5']", "NdOverlay['ndB']"]}
self.zorder: 0 oidx: 0 offset: 0
plottype <class 'holoviews.plotting.bokeh.raster.RGBPlot'> zorder 0
self.zorder: 0 oidx: 1 offset: 0
plottype <class 'holoviews.plotting.bokeh.raster.RGBPlot'> zorder 1

The stream_sources dictionary, whose keys are zorders and values list of source objects, seems about right, modulo some limited understanding of how it's built and used :) One thing we noticed is that the DynamicMaps wrapping the NdOverlays have for label the label of the first Curve of the NdOverlay (e.g. 'c1' for dnda). It seems somewhat related to the issue at hand.

# output of `compute_overlayable_zorders(obj)`
{0: ["DynamicMap['c1']", "Curve['c1']", "NdOverlay['ndA']"],
 1: ["Curve['c2']", "NdOverlay['ndA']"],
 2: ["Curve['c3']", "NdOverlay['ndA']"],
 3: ["DynamicMap['c4']", "Curve['c4']", "NdOverlay['ndB']"],
 4: ["Curve['c5']", "NdOverlay['ndB']"]}

The zorder value passed to RGBPlot is more concerning. The second RGB is created with a zorder of 1 while, given the content ofstream_sources, it seems it should be 3. Basically at this stage the zorder value does not account for the number of Curves contained by each NdOverlay.

Some really dirty hack like injecting that before plottype is called in _create_subplot seems to correctly link the streams:

        if zorder == 1:
            zorder = 3

Now we need to understand a little better what's wrong and find a general solution.

@philippjfr
Copy link
Member

Now we need to understand a little better what's wrong and find a general solution.

Good luck, that's probably up there with the hairiest code in HoloViews as it combines stream mapping and dynamic zorder remapping which are both individually some of the hairiest pieces of code.

@jlstevens
Copy link
Contributor

Here is another example that might help us triangulate the problem better:

import holoviews as hv
from holoviews.operation.datashader import rasterize
hv.extension('bokeh')

curve_count = 1  # 1 works, 2 doesn't. With 'workaround' 2 works and 1 doesn't
ndoverlay = hv.NdOverlay({str(i):hv.Curve([1,2*i, 3*i]) for i in range(1,1+curve_count)})
rasterized = rasterize(ndoverlay).opts(width=800, height=400)

def inner(bounds):
    if bounds is None:
        return hv.Rectangles((1, 1, 2, 2))
    else:
        return hv.Rectangles((bounds[0], 1, 2, 2))

dmap = hv.DynamicMap(inner,streams=[hv.streams.BoundsXY()])
rasterized.opts(tools=['box_select']) * dmap

Here curve_count=1 works but 2 doesn't. I can make curve_count=2 work (but 1 now doesn't) with this version of the hack:

if zorder == 1:
   zorder = 2

I think we need to collect these examples, figure out what the zorder values should be and turn these examples into unit tests. That can help guide us when trying to find out what is wrong in this hairy piece of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants