facebookresearch/hiplot

Streamlit component causes resets of entire page

F1nnM opened this issue ยท 6 comments

F1nnM commented

Hi again,
I work with a large dataset in the Streamlit-component of HiPlot. Whenever I select something in the plot it turns gray, as it's waiting for Streamlit to run, which takes a couple of seconds due to the large dataset. When I repeatedly click around in the plot (firing updates), while it's still loading, at one point Streamlit resets the entire page and all inputs/selections are lost. That might happen after just three clicks or after 20, but it happens. It also happens when the plot is loading and I change other Streamlit inputs, so it might be a Streamlit issue, but I can't say that for sure and I was asked to also open this issue here.

Streamlit issue: streamlit/streamlit#2695

Hi - thank you for reporting this issue :)

A few questions:

  • Could you post a video/screenshots of the problem?
  • If you can, some code snippets might help (even with dummy data)
  • What is the size of your dataset? (in number of rows/columns)
  • Are you modifying the dataset?
  • Do you use the argument key in display_st ?
F1nnM commented

Let's start with the easier ones.
I am using the key argument.
I sometimes modify the dataset between runs. Within one run I don't modify it after displaying the plot.
My dataset can get arbitrarily big, only limited by the display width and Streamlit's 50MB limit. So, most datasets are that big, that they need some filtering before I can feed it into Hiplot. After filtering, one dataset close to that limit is 10 columns x ~80.000 rows.

I'll follow this up tomorrow with a snippet and maybe a video if I can.

F1nnM commented

I've managed it to capture it on video: https://youtu.be/eoApLIJ9CkA
The Runtime Error you see briefly is from the first attempt of rendering the HiPlot before the filters I selected on the left are applied.

F1nnM commented

Not reeaally related to this, but I just came across this: https://youtu.be/7Nbo38DSKUk
Can't recreate it and only saw it once, so I can't give any helpful information and didn't want to open a separate issue. But apparently that can happen.

F1nnM commented

Alright, I was able to reproduce the error without the HiPlot component. It is not related to HiPlot at all, I'm sorry for bothering you with this.
Have a good day! ๐Ÿ˜„

Oh thanks for the update :)