-
Notifications
You must be signed in to change notification settings - Fork 4
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
Visualisation example errors #112
Comments
I also get an error for the interactive visualization example:
|
In case it's a compatibility issue, here's my package listing:
|
Sorry about that. I will automate testing of doc examples in the futures. These problems will be fixed with PR #113. In the first case, the example has been adjusted, in the second case we now strip the units before passing the arrays to dask dataframes due to their lack of handling pint units (for now). |
The 2D histogram example now works for me. The interactive visualisation example seems to be missing some code to actually make the plot appear (I'm running for CLI, not sure if it might appear automatically in a notebook). I'm not familiar with holoviews but I took a guess with At a guess this might be because I'm trying to run in python3.11, which I see isn't in your test matrix. Might be worth specifying |
Interesting. Does it show the bokeh/holoview icons? No dedicated plotting/render command should be issued as far as I understand (see e.g. here: https://holoviews.org/getting_started/Introduction.html). I am using python 3.9, I also tested a new python 3.11.5 environment:
The snippet for the interactive plotting works just fine* in this environment (also implying that there is no inherent problem with python 3.11). From my experience, bokeh applets not showing is related to the frontend environment that runs the jupyter server (which can be different from the ipython kernel). Could you check https://stackoverflow.com/a/46894021 ? Once this is resolved, I will add an infobox linking to resources regarding such issue with bokeh/datashader. *=even though I get the following additional output: |
Ok, I have some more information. Up until now I was trying to work either from a basic python interactive session, or an ipython interactive session (without jupyter-notebook or jupyter-lab). I confirm that with your proposed conda venv I can run the example without generating errors (but without generating expected output either). In python and ipython I don't get any visualisation appearing (perhaps unsurprisingly - holoviz/holoviews#4434). I can however assign and then save the visualisation like this:
This does create a bokeh figure that shows the density field, however the dynamic loading as the image is panned or zoomed doesn't work in this case. Unclear to me whether this is the expected behaviour when using
That opens in a browser but doesn't do the dynamic loading demonstrated in the video in the tutorial. If I run your snippet in a jupyter-lab or jupyter-notebook I get the bokeh and hv logos but no figure. In principle we should both be using the same versions of jupyter (installed with the venv), right? So I think that the frontends should be the same? I tried a bit of troubleshooting like Overall for the visualisation examples page I suggest signposting to holoviews & bokeh docs as needed, and making it clear whether you expect the user to run the example in python/ipython/jupyter-notebook/jupyter-lab. I can't seem to reproduce the numpy+holoviews conflicts that I mentioned before on fresh virtual environment installations, even with various permutations. I must have inadvertently created some conflict through subsequent package installs in the venv I was working on before (that I'd created specifically for this review, so it was supposed to be relatively "clean"). I think that issue can be dropped. |
Good point. I would generally not assume that hv.save(), allows live data interaction.
Above snippet just uses the environment for the ipython kernel, not for the front end. The kernel and jupyter server can be entirely different versions. (I start the jupyter server from another environment). For better comparison, I now start the jupyter server from above conda enviroment: The interactive plotting works as expected there as well. Potentially this could have something to do with the jupyter configuration and plugins [which are not isolated in the env]?
I agree: I think the interactive mode should be expected to only work with jupyter-notebook and jupyter-lab - once we fix your issue. Could you try running this notebook?This would determine whether this has anything to do with scida at all. |
I will close this issue shortly. I fixed the original two errors in PR #113 and have added a link to the holoviews tutorial page to try out first before attempting to execute the scida example. |
Attempting to run the 2D histogram example in the visualization documentation results in an error. Initially I thought that
bins=100
not being a 2-tuple was the issue, but trying withbins=(100, 100)
or omitting this kwarg raises the same errorThe text was updated successfully, but these errors were encountered: