Hiplot doesn't resize in streamlit web app
Emmanuelpean opened this issue · 4 comments
For example, when viewing the distribution of a certain column, the Hiplot "frame" does not resize and some of it is hidden. The only way to force the frame to update is to slice data by clicking on one of the columns.
import streamlit as st
import hiplot as hip
data = [{'uid': 'a', 'dropout<sub>3</sub>': 0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD'},
{'uid': 'b', 'dropout<sub>3</sub>': 0.15, 'lr': 0.01, 'loss': 3.5, 'optimizer': 'Adam'},
{'uid': 'c', 'dropout<sub>3</sub>': 0.3, 'lr': 0.1, 'loss': 4.5, 'optimizer': 'Adam'}]
xp = hip.Experiment.from_iterable(data)
ret_val = xp.to_streamlit(ret="selected_uids", key="hip").display()
Hi @Emmanuelpean and thanks for the report.
Can you attach a screenshot (+ steps to reproduce) to explain what is happening? I'm not sure if I understand correctly.
I've made a quick video to explain the problem. Hope that helps.
https://user-images.githubusercontent.com/56644205/139914958-210e303c-fcbc-4b48-9738-05b045adbee6.mov
ooh right I see what you mean! I'll take a look when I have some time
Thanks for the fix. It looks like that changing the number of rows/entries displayed does not update the streamlit layout as well.