← Lab
dbflip
confirmedupstream bugPython · torchmetricsInference & servingJuly 24, 2026
the question
Does torchmetrics' DaviesBouldinScore declare the correct optimization direction for MetricTracker?
what came out
torchmetrics declares DaviesBouldinScore.higher_is_better=True, but the Davies-Bouldin index is lower-is-better (min 0). MetricTracker reads the flag and maximizes it, selecting the worst clustering (DB 5.94) as best over the good one (0.026). The flag and docstring were copied from Calinski-Harabasz. Fix: higher_is_better=False.
method & receipts
- Result: confirmed
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/dbflip