## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 10:09

wip Basic upsampling and downsampli… Added raster quadmesh tests (se… and 2 more (compare)

• 09:27
SandervandenOord opened #1016
• 03:43
philippjfr labeled #1015
• 02:39
thoth291 opened #1015
• 02:22
philippjfr synchronize #1007
• 02:22

Fixes for transforms Fixed Ace theme mapping Changed default sizing_mode to … and 8 more (compare)

• Jan 26 22:33
sgillies commented #409
• Jan 26 21:06
philippjfr labeled #1010
• Jan 26 21:06
philippjfr unlabeled #1010
• Jan 26 21:06
philippjfr labeled #1011
• Jan 26 21:06
philippjfr unlabeled #1011
• Jan 26 21:05
philippjfr labeled #1012
• Jan 26 21:05
philippjfr unlabeled #1012
• Jan 26 21:05
philippjfr labeled #1013
• Jan 26 21:05
philippjfr unlabeled #1013
• Jan 26 21:05
philippjfr unlabeled #1014
• Jan 26 21:05
philippjfr labeled #1014
• Jan 26 18:56
martinfleis commented #409
• Jan 26 18:41
martinfleis commented #409
• Jan 26 18:37
sgillies commented #409
Philipp Rudiger
@philippjfr
Right I'm primarily talking server side as well, client side would be handled by bokeh and I think it already does that reasonably well.
Yes, I think so, although Panel could supplement the logging, would have to think about what though.
The logging request is here holoviz/param#375
Sander van den Oord
@SandervandenOord

I updated my packages:
holoviews==1.13.0a2
hvplot==0.5.2.post12+g1c76c1f
jupyterlab==1.2.5
panel==0.8.0rc
param==1.10.0a2

And now getting following warning when running code below:

WARNING:param.ParameterizedMetaclass: Use method 'params' via param namespace

import seaborn as sns
import holoviews as hv
hv.extension('bokeh')
import hvplot.pandas
import pandas as pd

iris.hvplot.scatter(x='sepal_length', y='sepal_width')
Andrew Tolmie
@DancingQuanta
@SandervandenOord Are you aware of this holoviz/holoviews#4201 You could contribute reports to this.
Not sure if it is related.
Philipp Rudiger
@philippjfr
It is indeed related and has been fixed in the latest dev release, your holoviews version is old, we're on 1.13.0a22
James A. Bednar
@jbednar
You can roll back param to the previous dev release if you don't want the warnings; the current dev release of Param is deliberately enabling those warnings so that we spot such issues across all of our other libraries that use Param.
Sander van den Oord
@SandervandenOord
ok, upgraded to holoviews==1.13.0a22, hvPlot still gives errors in the example above.
Philipp Rudiger
@philippjfr
Hmm, was hoping hvplot didn't have these issues.
To be clear you're also on panel 0.8.0rc2?
Can't tell, your version listing above doesn't say.
Sander van den Oord
@SandervandenOord
jep
panel==0.8.0rc2
Philipp Rudiger
@philippjfr
Okay @jlstevens is currently working on updating all the repos so there should be a new hvPlot dev release soon.
Oh actually it might be this one which was missed: holoviz/holoviews#4203
Sander van den Oord
@SandervandenOord
FYI later this month pandas 1.0 is coming out, pre-release is already available.
They have some new datatypes such as pd.NA, pd.BooleanDtype(), pd.Int64Dtype, pd.StringDtype() = a real string datatype, so not an object datatype anymore.
Don't know if this effects HoloViz?
https://pandas.pydata.org/pandas-docs/version/1.0.0/whatsnew/v1.0.0.html
Philipp Rudiger
@philippjfr
It very well might, could you file an issue to remind us?
Jean-Luc Stevens
@jlstevens
@SandervandenOord I am currently updating hvplot so that warning will go away
Sander van den Oord
@SandervandenOord
Nice! :)
Jacob Barhak
@Jacob-Barhak
@jlstevens , @philippjfr - I think I broke your tools. I was complaining before that generating plots takes hours. Yet I think I totally broke your tools now. The ssystem just shuts down. Here is the error I get:
:Layout
.Points.I :HoloMap   [Display,Iteration,Interpretation]
:Points   [PopulationAcronym,Value]   (Cohort,Iteration,Interpretation,FillAlpha,FillColor,LineWidth,LineColor,Size,Study_Length,SBP,Smoke,Lipid_Ratio,BMI,Record_Count,A1c,Year,Cohort_Size,Male,Age)
saving using panel and INLINE the file: PopulationPlot
Traceback (most recent call last):
File "ExploreOptimizationResultsNew.py", line 964, in <module>
SaveFile(PopulationPlotFileWeb,PopulationHoloviewsPlot,None,SaveInline)
File "ExploreOptimizationResultsNew.py", line 127, in SaveFile
SaveObject.save(OutputDirectory+os.sep+FileName, resources=INLINE, title = Phase4Dir, embed=True)
File "C:\Users\Work\Anaconda2\envs\dev\lib\site-packages\panel\viewable.py", line 559, in save
File "C:\Users\Work\Anaconda2\envs\dev\lib\site-packages\panel\io\save.py", line 95, in save
File "C:\Users\Work\Anaconda2\envs\dev\lib\site-packages\panel\io\embed.py", line 141, in embed_state
len(cross_product))
RuntimeError: The cross product of different application states is too large to explore (N=1050), either reduce the number of options on the widgets or increase the max_states specified on static export.
Jacob Barhak
@Jacob-Barhak
Is there a workaround for this? Is there a way to set the limit? I have 3 widgets: 2 sliders and a one selection box -see images I sent before - only now I have 50% more iterations than I had before - so reached the limit. It seem reasonable should be able to explore all situations. And guys - you will have folk that want to explore more dimensions with more possible combinations - the limitation should be by compute power - and use parallel computing - not by hard coded limit to raise an error... I think this is an important issue to raise - hopefully you agree.
xavArtley
@xavArtley
@Jacob-Barhak why don't you increase the max_states as the error tells you?
I don't use the save function to embed states but as the docstring and the error specify you should just do .save(max_states=float("inf"))
xavArtley
@xavArtley
Jacob Barhak
@Jacob-Barhak
Thanks @xavArtley , this is a nice idea I will try now- if only I knew this option existed. You see, the error text does not suggest this explicitly by naming max_states - this is why I went and asked the group. In any case, I am not sure this has to be a limiting factor that is hard coded. It seems to me this should be more like a warning rather than an error. If I have a strong machine , why should I be limited by some number hardcoded in the library? This what would happen if python would limit for loops to be less that 10,000 elements unless some option was changed. The same with numpy, is does not block defining a matrix of larger than10000x10000 in size if you have the memory. I hope I make better sense now in my comment. For now, changing the error text of the message should be a good enough fix to set max_states to 2000, yet in the future, I suggest considering replacing it with a warning related to memory / compute time.
xavArtley
@xavArtley
I found the error pretty explicit and I prefer to run into this error to not waste may be some hours just because I haven't anticpated there could be billion of possible combinations. But it's only my own point of view
Jacob Barhak
@Jacob-Barhak
ok @xavArtley - to make the error more specific here is what it should read: "The cross product of different application states is too large to explore (N=1050), either reduce the number of options on the widgets or increase the max_states specified on the save command: save(... , max_states = 1050) " . You see @xavArtley , I did not associate "static export" with the save command option - I did not even know that there was such an option in the save command until you sent me the function description. In fact I was surprised that there was a hard limit at all - it there a reason for that limit at all? This is what I am asking. If it is for user protection, then perhaps a memory/ time related warning would be better... You know what, I am opening an issue - I think it is worthwhile fixing for the future. The only reason that this hard limit should be there is perhaps for marketing purposes like having an enterprise version and a community version of the library where the enterprise version is unlimited while the community version is limited. Otherwise, this hard limit makes no sense.
Philipp Rudiger
@philippjfr
The limit is there so people don't think it is broken, and because very very few people will be okay with a 50 MB+ exported HTML file.
If you want to contribute you could implement a progress bar for it, in which case I'd be happy to remove the limit.
For now I'd also happily accept a PR to improve the warning.
Jacob Barhak
@Jacob-Barhak
Well @philippjfr , you will be surprised - 50MB is nothing compared so some of the data being processed. My own simulations when compressed generate about 20Gb footprint and this is after I prune a lot of the data. The tools you are developing are designed to look at multidimensional data - data that grows exponentially - so limiting yourself here is not a good idea. Yes - it takes forever to finish computation, yet there is no reason to limit - a warning is much better. A progress bar is also a nice idea. And palatalization interface for an enterprise may be a nice future plug-in . The good news are that you now know that there is a need to remove that limit - one of the arguments of not using spreadsheets are that those are limited to 16K columns - microsoft added it to the spec many years ago and today it is insufficient so people are moving towards other solutions - python is one of them - if you are visualizing big data - please do not limit yourself. I just broke your limit... Its better you think if it possible to reduce the sizes/time related to the generating a large plot...
I have some time on my hands tomorrow - I will see if I can add a PR - now that that know there is an issue... I would have done this today, yet I am representing capital factory as an athlete in the startup games today - so not much coding for me today.
Yet I am running the test now - lets see how big the file after allowing 1050 states - will tell tomorrow. Thanks for being active over the weekend.
Andrew Tolmie
@DancingQuanta
It would be productive to document the arguments in the opened GitHub issue. This is a hard place to discuss this kind of issue.
kmallick2000
@kmallick2000
I am not seeing the accept functionality in Panel's FileInput widget. I want to select a .csv file from front end which gets saved in the back end. I have added pn.widgets.FileInput(accept='.csv') to restrict file selection to .csv files, however the widget lets me select any file. am I missing something?
'''
test.py
'''
import panel as pn
def callback(event):
if file_input.value is not None:

file_input = pn.widgets.FileInput(accept='.csv')
file_input.param.watch(callback, 'value')

file_input.servable()
Philipp Rudiger
@philippjfr
Honestly I don't quite know how it works, presumably it lets you select it but doesn't upload it to the server? If it doesn't work at all that's an issue to file with bokeh.
kmallick2000
@kmallick2000
Thanks. The save functionality seems to be unique to panel and is working fine. I am having trouble with the ‘accept’, it doesn’t let me restrict file selection to the specific file extensions. I will check on bokeh side.
ea42gh
@ea42gh
Came across this: https://discourse.julialang.org/t/invitation-to-vizcon-2-12-16-march-2020/33806
Could this be an opportunity to get some more pyviz users? (Tongue in cheek!)
Philipp Rudiger
@philippjfr
@kmallick2000 Worked fine when I tried it earlier.
Jacob Barhak
@Jacob-Barhak
@philippjfr - looking at the save code in panel I noticed that max_opts does nothing special - the only thing ti seems to affect is the slider code
Jacob Barhak
@Jacob-Barhak

Here is the relevant code from slider.py

    def _get_embed_state(self, root, max_opts=3):
ref = root.ref['id']
w_model, parent = self._models[ref]
_, _, doc, comm = state._views[ref]

# Compute sampling
start, end, step = w_model.start, w_model.end, w_model.step
span = end-start
dtype = int if isinstance(step, int) else float
if (span/step) > (max_opts-1):
step = dtype(span/(max_opts-1))

I did not see max_opts affect anything else. The questions is why this parameter is there anyway? I did not see anything similar in select.py - also, does it mean that if I have a slider larger than 3 it will not save properly - because max_opts=3 as default in the save command. This makes no sense - I have a slider with 6 options that works - I must be missing something abut what max_opts is and why is it needed at all in the embedded save.

As for a progress bar, is https://github.com/tqdm/tqdm an acceptable progress bar, or do you prefer another tool - also, where do you define libraries you depend on in panel?

I am trying to assemble a PR for you - yet rather consult before - hence the questions.
neocronomican