You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current transformers version 4.46.1 def compute_loss signature changed causing issues when importing and using from tevatron.retriever.trainer import TevatronTrainer as Trainer (The transformers code change is probably due to the recent fix w.r.t. gradient accumulation).
Changing the loss signature to def compute_loss(self, model, inputs, return_outputs=False, num_items_in_batch=None):
in the trainer fixes the issue. This seems to be backward compatible to older transformer versions.
The text was updated successfully, but these errors were encountered:
Current transformers version 4.46.1
def compute_loss
signature changed causing issues when importing and usingfrom tevatron.retriever.trainer import TevatronTrainer as Trainer
(The transformers code change is probably due to the recent fix w.r.t. gradient accumulation).Changing the loss signature to
def compute_loss(self, model, inputs, return_outputs=False, num_items_in_batch=None):
in the trainer fixes the issue. This seems to be backward compatible to older transformer versions.
The text was updated successfully, but these errors were encountered: