bulubula commited on
Commit
919a76a
1 Parent(s): e4dc289

removing username

Browse files
Files changed (2) hide show
  1. app.py +6 -10
  2. utils.py +3 -5
app.py CHANGED
@@ -32,7 +32,6 @@ wandb_api = wandb.Api()
32
  def update_leader_info(leader_info, competition, best_model):
33
  if leader_info.get(competition) is None:
34
  leader_info[competition] = {
35
- "Username": best_model["Username"],
36
  "Hotkey": best_model["Hotkey"],
37
  "Date": time.strftime("%Y-%m-%d"),
38
  "Days on Top": 1
@@ -45,7 +44,6 @@ def update_leader_info(leader_info, competition, best_model):
45
  days_on_top = (current_date - start_date).days
46
  leader_info[competition]["Days on Top"] = days_on_top + 1
47
  else:
48
- leader_info[competition]["Username"] = best_model["Username"]
49
  leader_info[competition]["Hotkey"] = best_model["Hotkey"]
50
  leader_info[competition]["Date"] = time.strftime("%Y-%m-%d")
51
  leader_info[competition]["Days on Top"] = 1
@@ -90,7 +88,6 @@ def main():
90
  st.session_state.leader_info[competition] = update_leader_info(st.session_state.leader_info, competition, best_model)
91
  else:
92
  st.session_state.leader_info[competition] = {
93
- "Username": "N/A",
94
  "Hotkey": "N/A",
95
  "Date": "N/A",
96
  "UID": "N/A",
@@ -126,8 +123,8 @@ def main():
126
  st.write("#### Select a competition to view more details and rankings.")
127
 
128
  # Create a header for the table
129
- cols = st.columns([1, 3, 2, 2, 2, 1, 2])
130
- headers = ["Index", "Competition Name", "Leader", "Date", "Hotkey", "Days on Top"]
131
  for col, header in zip(cols, headers):
132
  col.write(header)
133
 
@@ -135,15 +132,14 @@ def main():
135
  for index, (competition, details) in enumerate(COMPETITIONS.items(), start=1):
136
  leader_info = st.session_state.get("leader_info", {}).get(competition, {})
137
 
138
- cols = st.columns([1, 3, 2, 2, 2, 1, 2])
139
  cols[0].write(index)
140
 
141
  if cols[1].button(competition):
142
  st.session_state.selected_competition = competition
143
- cols[2].write(leader_info.get("Username", "N/A"))
144
- cols[3].write(leader_info.get("Date", "N/A"))
145
- cols[4].write(leader_info.get("Hotkey", "N/A"))
146
- cols[5].write(leader_info.get("Days on Top", "N/A"))
147
  if st.session_state.selected_competition:
148
  competition_name = st.session_state.selected_competition
149
  competition_details = COMPETITIONS.get(competition_name, {})
 
32
  def update_leader_info(leader_info, competition, best_model):
33
  if leader_info.get(competition) is None:
34
  leader_info[competition] = {
 
35
  "Hotkey": best_model["Hotkey"],
36
  "Date": time.strftime("%Y-%m-%d"),
37
  "Days on Top": 1
 
44
  days_on_top = (current_date - start_date).days
45
  leader_info[competition]["Days on Top"] = days_on_top + 1
46
  else:
 
47
  leader_info[competition]["Hotkey"] = best_model["Hotkey"]
48
  leader_info[competition]["Date"] = time.strftime("%Y-%m-%d")
49
  leader_info[competition]["Days on Top"] = 1
 
88
  st.session_state.leader_info[competition] = update_leader_info(st.session_state.leader_info, competition, best_model)
89
  else:
90
  st.session_state.leader_info[competition] = {
 
91
  "Hotkey": "N/A",
92
  "Date": "N/A",
93
  "UID": "N/A",
 
123
  st.write("#### Select a competition to view more details and rankings.")
124
 
125
  # Create a header for the table
126
+ cols = st.columns([1, 3, 2, 2, 1, 2])
127
+ headers = ["Index", "Competition Name", "Date", "Hotkey", "Days on Top"]
128
  for col, header in zip(cols, headers):
129
  col.write(header)
130
 
 
132
  for index, (competition, details) in enumerate(COMPETITIONS.items(), start=1):
133
  leader_info = st.session_state.get("leader_info", {}).get(competition, {})
134
 
135
+ cols = st.columns([1, 3, 2, 2, 1, 2])
136
  cols[0].write(index)
137
 
138
  if cols[1].button(competition):
139
  st.session_state.selected_competition = competition
140
+ cols[2].write(leader_info.get("Date", "N/A"))
141
+ cols[3].write(leader_info.get("Hotkey", "N/A"))
142
+ cols[4].write(leader_info.get("Days on Top", "N/A"))
 
143
  if st.session_state.selected_competition:
144
  competition_name = st.session_state.selected_competition
145
  competition_details = COMPETITIONS.get(competition_name, {})
utils.py CHANGED
@@ -63,9 +63,9 @@ def fetch_models_evaluation(api, projects, selected_project):
63
  summary = run.summary
64
  if summary.get("score") is not None: # Assuming runs with score are model evaluations
65
  data.append({
66
- "ID": run.id,
67
- "Username": run.user.username,
68
- "Hotkey": summary.get("miner_hotkey", "N/A"),
69
  "Score": summary.get("score"),
70
 
71
  "F1-beta": summary.get("fbeta"),
@@ -77,8 +77,6 @@ def fetch_models_evaluation(api, projects, selected_project):
77
 
78
  "ROC AUC": summary.get("roc_auc"),
79
  "Confusion Matrix": summary.get("confusion_matrix"),
80
-
81
- "Created At": run.created_at,
82
  #TODO link to huggingface model
83
  })
84
  except Exception as e:
 
63
  summary = run.summary
64
  if summary.get("score") is not None: # Assuming runs with score are model evaluations
65
  data.append({
66
+ "Created At": run.created_at,
67
+
68
+ "Miner hotkey": summary.get("miner_hotkey", "N/A"),
69
  "Score": summary.get("score"),
70
 
71
  "F1-beta": summary.get("fbeta"),
 
77
 
78
  "ROC AUC": summary.get("roc_auc"),
79
  "Confusion Matrix": summary.get("confusion_matrix"),
 
 
80
  #TODO link to huggingface model
81
  })
82
  except Exception as e: