ENSTA-U2IS-AI / torch-uncertainty

Open-source framework for uncertainty and deep learning models in PyTorch :seedling:
https://torch-uncertainty.github.io
Apache License 2.0
223 stars 16 forks source link

🐛 plot Calibration error #99

Closed mrynik closed 1 week ago

mrynik commented 4 weeks ago

Hey, just spotted a bug https://github.com/ENSTA-U2IS-AI/torch-uncertainty/blob/ff355d979b73e7c6acc8361e2616fdcc26d7fb6a/torch_uncertainty/metrics/classification/calibration_error.py#L63

This will fail if you pass in the ax object to the _ce_plot function because in that case fig is initialized to None. https://github.com/ENSTA-U2IS-AI/torch-uncertainty/blob/ff355d979b73e7c6acc8361e2616fdcc26d7fb6a/torch_uncertainty/metrics/classification/calibration_error.py#L18

o-laurent commented 4 weeks ago

Hi mrynik!

Thank you for the pointer! I pushed a quick fix on dev. We intend to rework the plots a bit in the following releases (#54)!