anomalib
anomalib copied to clipboard
Always reorder auc inputs after upgrading to pytorch 1.9.x
In the AUROC metric computation, we should ideally always reorder the inputs. Currently the lack of support for stable sorting in pytorch 1.8.1 prevents us from doing so (more detailed explanation here). Stable sorting was added in pytorch 1.9.0, so once we upgrade our requirements to that version, we should be able to always reorder the inputs using the stable=True option of torch.sort().