Skip to content

Commit 776c9d3

Browse files
authored
[Tests] Remove unused code (#29737)
Remove unused code
1 parent a1a7454 commit 776c9d3

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

tests/test_modeling_common.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,28 +1946,11 @@ def check_same_values(layer_1, layer_2):
19461946
# Check that the embedding layer and decoding layer are the same in size and in value
19471947
# self.assertTrue(check_same_values(embeddings, decoding))
19481948

1949-
# # Check that after modification, they remain the same.
1950-
# embeddings.weight.data.div_(2)
1951-
# # Check that the embedding layer and decoding layer are the same in size and in value
1952-
# self.assertTrue(embeddings.weight.shape, decoding.weight.shape)
1953-
# self.assertTrue(check_same_values(embeddings, decoding))
1954-
1955-
# # Check that after modification, they remain the same.
1956-
# decoding.weight.data.div_(4)
1957-
# # Check that the embedding layer and decoding layer are the same in size and in value
1958-
# self.assertTrue(embeddings.weight.shape, decoding.weight.shape)
1959-
# self.assertTrue(check_same_values(embeddings, decoding))
1960-
19611949
# Check that after resize they remain tied.
19621950
model_tied.resize_token_embeddings(config.vocab_size + 10)
19631951
params_tied_2 = list(model_tied.parameters())
19641952
self.assertEqual(len(params_tied_2), len(params_tied))
19651953

1966-
# decoding.weight.data.mul_(20)
1967-
# # Check that the embedding layer and decoding layer are the same in size and in value
1968-
# self.assertTrue(model.transformer.wte.weight.shape, model.lm_head.weight.shape)
1969-
# self.assertTrue(check_same_values(model.transformer.wte, model.lm_head))
1970-
19711954
@require_safetensors
19721955
def test_can_use_safetensors(self):
19731956
config, _ = self.model_tester.prepare_config_and_inputs_for_common()

0 commit comments

Comments
 (0)