Skip to content

Commit

Permalink
custom prediction step
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanLee97 committed Sep 30, 2024
1 parent a07f045 commit 5663a0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions angle_emb/angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,10 @@ def compute_loss(self, model, inputs, return_outputs=False):

return (loss, outputs) if return_outputs else loss

def prediction_step(self, model, inputs, **kwargs):
inputs['labels'] = None # avoid evaluation error
return super().prediction_step(model, inputs, prediction_loss_only=True, **kwargs)


class AngleESETrainer(AngleTrainer):
"""
Expand Down

0 comments on commit 5663a0f

Please sign in to comment.