Skip to content

Commit

Permalink
Fix accidental edit to test_modeling_common
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocketknight1 committed Dec 14, 2021
1 parent a9f7153 commit 4c99cc7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,7 @@ def test_push_to_hub(self):
model = BertModel(config)
with tempfile.TemporaryDirectory() as tmp_dir:
model.save_pretrained(os.path.join(tmp_dir, "test-model"), push_to_hub=True, use_auth_token=self._token)

new_model = BertModel.from_pretrained(f"{USER}/test-model")
for p1, p2 in zip(model.parameters(), new_model.parameters()):
self.assertTrue(torch.equal(p1, p2))
Expand Down

0 comments on commit 4c99cc7

Please sign in to comment.