TorchEnsemble-Community / Ensemble-Pytorch

A unified ensemble framework for PyTorch to improve the performance and robustness of your deep learning model.
https://ensemble-pytorch.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.08k stars 95 forks source link

Patience is ignored in bagging models #141

Closed lorenzozanisi closed 1 year ago

lorenzozanisi commented 1 year ago

I was having a look at bagging models in bagging.py. Specifically, at this line it looks like the ensemble state at the end of the training is saved, thus overwriting the decisions made in the validation loop. Can someone confirm if I'm reading this correctly?

xuyxu commented 1 year ago

Hi @lorenzozanisi, you are right, the strategy of saving the model with the best validation performance will not have a real effect. Thanks for reporting, will fix it soon.

xuyxu commented 1 year ago

@all-contributors please add @lorenzozanisi for bug

allcontributors[bot] commented 1 year ago

@xuyxu

I've put up a pull request to add @lorenzozanisi! :tada:

lorenzozanisi commented 1 year ago

Great, thanks for the fix!