Skip to content

Commit

Permalink
hard code to fix evaluation error
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanLee97 committed Sep 29, 2024
1 parent daf2bb6 commit ce52b7b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions angle_emb/angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ def compute_loss(self, model, inputs, return_outputs=False):
if mask_target_labels is not None:
loss += self.compute_mlm_loss(mlm_logits, mask_target_labels)

inputs['labels'] = None # avoid evaluation error
return (loss, outputs) if return_outputs else loss


Expand Down Expand Up @@ -989,6 +990,7 @@ def compute_loss(self, model, inputs, return_outputs=False):
if mask_target_labels is not None:
loss += self.compute_mlm_loss(mlm_logits, mask_target_labels)

inputs['labels'] = None # avoid evaluation error
return (loss, teacher_outputs) if return_outputs else loss


Expand Down

0 comments on commit ce52b7b

Please sign in to comment.