UserWarning: Metric AUROC
will save all targets and predictions in buffer.
#524
-
Hi, I'm training a model on a large dataset, and assessing its performance using AUROC. This causes the training to break after a few epochs due to out of memory issue related to this warning:
I'm wondering if it's possible not to store all prediction and ground truth values, and get rid of them after computing the metric ( especially when compute_on_step is set to true). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @blurry-mood, are you resetting the metric between epochs: def training/validation_epoch_end(self):
val = self.auroc_metric.compute()
self.log("train/val_auroc", val)
self.auroc_metric.reset() # reset before next epoch if not you are accumulating over all epochs which will lead to OOM. |
Beta Was this translation helpful? Give feedback.
Hi @blurry-mood, are you resetting the metric between epochs:
if not you are accumulating over all epochs which will lead to OOM.