Skip to content

Commit

Permalink
Some fields, especially Roberta fields, were being saved to the model…
Browse files Browse the repository at this point in the history
… that weren't used when reloading the model. strict=False lets it load
  • Loading branch information
AngledLuffa committed Oct 30, 2023
1 parent 90fee9a commit 2440029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stanza/models/coref/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def load_weights(self,
elif key.endswith("_scheduler"):
self.schedulers[key].load_state_dict(state_dict)
else:
self.trainable[key].load_state_dict(state_dict)
self.trainable[key].load_state_dict(state_dict, strict=False)
print(f"Loaded {key}")

def run(self, # pylint: disable=too-many-locals
Expand Down

0 comments on commit 2440029

Please sign in to comment.