Spaces:
Sleeping
Sleeping
Aryansabasana commited on
Commit ·
bc055ea
1
Parent(s): 6b718ad
Add test_dashboard.py utility script
Browse files- test_dashboard.py +14 -0
test_dashboard.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from dashboard import compute_metrics
|
| 2 |
+
|
| 3 |
+
metrics = compute_metrics(42)
|
| 4 |
+
for agent, data in metrics.items():
|
| 5 |
+
print(f"\n{agent}:")
|
| 6 |
+
for diff, m in data.items():
|
| 7 |
+
s = m['score']
|
| 8 |
+
c = m['cleared']
|
| 9 |
+
r = m['reward']
|
| 10 |
+
w = m['avg_wait']
|
| 11 |
+
if c is not None:
|
| 12 |
+
print(f" {diff:8}: score={s} | cleared={c} | reward={r} | wait={w}")
|
| 13 |
+
else:
|
| 14 |
+
print(f" {diff:8}: score={s}")
|