Hiplot with Streamlit
Hi All
I am tring to use hiplot on my local streamlit program to show high dimension Data.
But as I followed the steps on hiplot website
hiplot offical document
I encounter this problem.
My Code is as followed"
import json
import streamlit as st
import hiplot as hip
x1, x2, x3 = st.slider('x1'), st.slider('x2'), st.slider('x3')
# Create your experiment as usual
data = [{'uid': 'a', 'dropout': 0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD', 'x': x1},
{'uid': 'b', 'dropout': 0.15, 'lr': 0.01, 'loss': 3.5, 'optimizer': 'Adam', 'x': x2},
{'uid': 'c', 'dropout': 0.3, 'lr': 0.1, 'loss': 4.5, 'optimizer': 'Adam', 'x': x3}]
xp = hip.Experiment.from_iterable(data)
# Instead of calling directly `.display()`
# just convert it to a streamlit component with `.to_streamlit()` before
ret_val = xp.to_streamlit(ret="selected_uids", key="hip").display()
st.markdown("hiplot returned " + json.dumps(ret_val))
It will be great if someone have encountered and solved this problem!
Appreciate in front!
Debug info
- Streamlit version: (version 1.22.0)
- Python version: (Python 3.10.9)
- hiplot version:(hiplot 0.1.33)
- Browser version: