Spaces:
Runtime error
Runtime error
File size: 935 Bytes
fdda9c6 950900c e9bffe1 fdda9c6 e9bffe1 fdda9c6 d2e5b38 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import datetime
import streamlit as st
import pandas as pd
import wandb
from dashboard_utils.time_tracker import _log, simple_time_tracker
CACHE_TTL = 120 # note: in the text, we claim that this plot is updated every few minutes
@st.cache(ttl=CACHE_TTL)
@simple_time_tracker(_log)
def get_main_metrics():
wandb.login(anonymous="must")
api = wandb.Api()
run = api.run('learning-at-home/dalle-hivemind/runs/3l7q56ht')
history = run.history(keys=["step", "loss", "alive peers", "_timestamp"])
steps = []
losses = []
alive_peers = []
dates = []
for _, row in history.iterrows():
steps.append(row["step"])
losses.append(row["loss"])
alive_peers.append(row["alive peers"])
dates.append(datetime.datetime.utcfromtimestamp(row["_timestamp"]))
return pd.DataFrame({"steps": steps, "training loss": losses, "active participants": alive_peers, "wall time": dates})
|