From fccb9d84c4fb2a7c692bd8bb76a69079c149e6dc Mon Sep 17 00:00:00 2001 From: Sean Lee Date: Mon, 30 Sep 2024 09:46:10 +0800 Subject: [PATCH] print eval loss --- angle_emb/angle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/angle_emb/angle.py b/angle_emb/angle.py index f92c34a..4f5a025 100644 --- a/angle_emb/angle.py +++ b/angle_emb/angle.py @@ -862,7 +862,9 @@ def compute_loss(self, model, inputs, return_outputs=False): def prediction_step(self, model, inputs, *args, **kwargs): kwargs.pop('prediction_loss_only', None) inputs.pop('labels', None) - return super().prediction_step(model, inputs, prediction_loss_only=True, **kwargs) + ret = super().prediction_step(model, inputs, prediction_loss_only=True, **kwargs) + print(f'eval loss: {ret[0]}') + return ret class AngleESETrainer(AngleTrainer):