Skip to content

Commit

Permalink
print eval loss
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanLee97 committed Sep 30, 2024
1 parent 959bf1b commit fccb9d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion angle_emb/angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fccb9d8

Please sign in to comment.