Skip to content

Commit

Permalink
fix evaluation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 20, 2024
1 parent 146b2ee commit 776d4ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runner/eval_thresholds.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ def pass_time(tensorboard_logfile: str) -> float:
QualityMetrics.THRESHOLD["RMSE_whole_object"],
QualityMetrics.THRESHOLD["RMSE_background"],
] + [QualityMetrics.THRESHOLD["AEM_VOI"]] * len(tags)
metrics += list(tags.values())
metrics.extend(tags.values())
metrics = np.array(metrics).T # [(value, time), step, (RMSE, RMSE, VOI, ...)]

metrics = np.array(zip(*metrics))
try:
i = QualityMetrics.pass_index(metrics[:,0], thresholds)
i = QualityMetrics.pass_index(metrics[0], thresholds)
except IndexError:
return np.inf
return metrics[i][1] - (start or metrics[0][1])
return metrics[1][i] - (start or metrics[1][0])

if __name__ == '__main__':
timings = defaultdict(list) # {"dataset.name": [(time: float, "algo"), ...], ...}
Expand Down
Empty file modified runner/eval_thresholds.sh
100644 → 100755
Empty file.

0 comments on commit 776d4ca

Please sign in to comment.