steffenc commited on
Commit
c2bf255
·
1 Parent(s): 0007a6b

Allow all 1.0.[0-9] tags and filter completions

Browse files
Files changed (2) hide show
  1. dashboard.py +1 -1
  2. opendashboards/utils/plotting.py +5 -1
dashboard.py CHANGED
@@ -9,7 +9,7 @@ from opendashboards.assets import io, inspect, metric, plot
9
  # Hotkey churn
10
 
11
  DEFAULT_PROJECT = "openvalidators"
12
- DEFAULT_FILTERS = {"tags": {"$in": ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4"]}}
13
  DEFAULT_SELECTED_RUNS = ['kt9bzxii']
14
  DEFAULT_SELECTED_HOTKEYS = None
15
  DEFAULT_SRC = 'followup'
 
9
  # Hotkey churn
10
 
11
  DEFAULT_PROJECT = "openvalidators"
12
+ DEFAULT_FILTERS = {"tags": {"$in": [f'1.0.{i}' for i in range(10)]}}
13
  DEFAULT_SELECTED_RUNS = ['kt9bzxii']
14
  DEFAULT_SELECTED_HOTKEYS = None
15
  DEFAULT_SRC = 'followup'
opendashboards/utils/plotting.py CHANGED
@@ -198,7 +198,11 @@ def plot_completion_rewards(
198
  else:
199
  completions = completion_counts.index[:ntop]
200
  print(f"Using top {len(completions)} completions: \n{completions}")
201
-
 
 
 
 
202
  # Get ranks of completions in terms of number of occurrences
203
  ranks = completion_counts.rank(method="dense", ascending=False).loc[completions].astype(int)
204
 
 
198
  else:
199
  completions = completion_counts.index[:ntop]
200
  print(f"Using top {len(completions)} completions: \n{completions}")
201
+ else:
202
+ found_completions = [c for c in completions if c in completion_counts.index]
203
+ print(f"Using {len(found_completions)}/{len(completions)} completions: \n{found_completions}")
204
+ completions = found_completions
205
+
206
  # Get ranks of completions in terms of number of occurrences
207
  ranks = completion_counts.rank(method="dense", ascending=False).loc[completions].astype(int)
208