SaulLu commited on
Commit
1714075
2 Parent(s): c48bbc0 11dce67

Add the possibility to choose the run taken for the main metric (#5)

Browse files
Files changed (1) hide show
  1. dashboard_utils/main_metrics.py +2 -3
dashboard_utils/main_metrics.py CHANGED
@@ -5,7 +5,7 @@ import wandb
5
 
6
  from dashboard_utils.time_tracker import _log, simple_time_tracker
7
 
8
- WANDB_REPO = st.secrets["WANDB_REPO_MAIN_METRICS"]
9
  CACHE_TTL = 100
10
 
11
 
@@ -13,8 +13,7 @@ CACHE_TTL = 100
13
  @simple_time_tracker(_log)
14
  def get_main_metrics():
15
  api = wandb.Api()
16
- runs = api.runs(WANDB_REPO)
17
- run = runs[0]
18
  history = run.scan_history(keys=["step", "loss", "alive peers", "_timestamp"])
19
 
20
  steps = []
 
5
 
6
  from dashboard_utils.time_tracker import _log, simple_time_tracker
7
 
8
+ WANDB_RUN_URL = st.secrets["WANDB_RUN_URL_MAIN_METRICS"]
9
  CACHE_TTL = 100
10
 
11
 
 
13
  @simple_time_tracker(_log)
14
  def get_main_metrics():
15
  api = wandb.Api()
16
+ run = api.run(WANDB_RUN_URL)
 
17
  history = run.scan_history(keys=["step", "loss", "alive peers", "_timestamp"])
18
 
19
  steps = []