Spaces:
Runtime error
Runtime error
convert to altair charts
Browse files
app.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
from dashboard_utils.main_metrics import get_main_metrics
|
| 2 |
import streamlit as st
|
| 3 |
import wandb
|
|
|
|
|
|
|
| 4 |
from streamlit_observable import observable
|
| 5 |
|
| 6 |
from dashboard_utils.bubbles import get_new_bubble_data
|
|
@@ -11,8 +13,15 @@ st.title("Training transformers together dashboard")
|
|
| 11 |
st.header("Training Loss")
|
| 12 |
|
| 13 |
steps, losses, alive_peers = get_main_metrics()
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
st.header("Collaborative training participants")
|
| 18 |
st.header("Snapshot")
|
|
@@ -25,4 +34,8 @@ observers = observable(
|
|
| 25 |
)
|
| 26 |
|
| 27 |
st.header("Overtime")
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from dashboard_utils.main_metrics import get_main_metrics
|
| 2 |
import streamlit as st
|
| 3 |
import wandb
|
| 4 |
+
import pandas as pd
|
| 5 |
+
import altair as alt
|
| 6 |
from streamlit_observable import observable
|
| 7 |
|
| 8 |
from dashboard_utils.bubbles import get_new_bubble_data
|
|
|
|
| 13 |
st.header("Training Loss")
|
| 14 |
|
| 15 |
steps, losses, alive_peers = get_main_metrics()
|
| 16 |
+
source = pd.DataFrame({
|
| 17 |
+
"steps": steps, "loss":losses, "alive participants":alive_peers
|
| 18 |
+
})
|
| 19 |
|
| 20 |
+
chart_loss = alt.Chart(source).mark_line().encode(
|
| 21 |
+
x='steps',
|
| 22 |
+
y='loss'
|
| 23 |
+
)
|
| 24 |
+
st.altair_chart(chart_loss)
|
| 25 |
|
| 26 |
st.header("Collaborative training participants")
|
| 27 |
st.header("Snapshot")
|
|
|
|
| 34 |
)
|
| 35 |
|
| 36 |
st.header("Overtime")
|
| 37 |
+
chart_alive_peer = alt.Chart(source).mark_line().encode(
|
| 38 |
+
x='steps',
|
| 39 |
+
y='alive participants'
|
| 40 |
+
)
|
| 41 |
+
st.altair_chart(chart_alive_peer)
|