SalazarPevelll commited on
Commit
d5fa9ad
1 Parent(s): f1cc81a
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. saved_models/cocosoda/save_tokenizer.log +347 -0
  2. saved_models/codesearch_contrastive_learning/Model/Epoch_1/base_dvi.pth +3 -0
  3. saved_models/codesearch_contrastive_learning/Model/Epoch_1/bgimg.png +0 -0
  4. saved_models/codesearch_contrastive_learning/Model/Epoch_1/embedding.npy +3 -0
  5. saved_models/codesearch_contrastive_learning/Model/Epoch_1/index.json +0 -0
  6. saved_models/codesearch_contrastive_learning/Model/Epoch_1/scale.npy +3 -0
  7. saved_models/codesearch_contrastive_learning/Model/Epoch_1/subject_model.pth +3 -0
  8. saved_models/codesearch_contrastive_learning/Model/Epoch_1/test_data.npy +3 -0
  9. saved_models/codesearch_contrastive_learning/Model/Epoch_1/train_data.npy +3 -0
  10. saved_models/codesearch_contrastive_learning/Model/Epoch_2/base_dvi.pth +3 -0
  11. saved_models/codesearch_contrastive_learning/Model/Epoch_2/bgimg.png +0 -0
  12. saved_models/codesearch_contrastive_learning/Model/Epoch_2/embedding.npy +3 -0
  13. saved_models/codesearch_contrastive_learning/Model/Epoch_2/index.json +0 -0
  14. saved_models/codesearch_contrastive_learning/Model/Epoch_2/scale.npy +3 -0
  15. saved_models/codesearch_contrastive_learning/Model/Epoch_2/subject_model.pth +3 -0
  16. saved_models/codesearch_contrastive_learning/Model/Epoch_2/test_data.npy +3 -0
  17. saved_models/codesearch_contrastive_learning/Model/Epoch_2/train_data.npy +3 -0
  18. saved_models/codesearch_contrastive_learning/Model/__pycache__/model.cpython-37.pyc +0 -0
  19. saved_models/codesearch_contrastive_learning/Model/__pycache__/model.cpython-38.pyc +0 -0
  20. saved_models/codesearch_contrastive_learning/Model/model-cs.py +396 -0
  21. saved_models/codesearch_contrastive_learning/Model/model.py +453 -0
  22. saved_models/codesearch_contrastive_learning/Model/time_base_dvi.json +1 -0
  23. saved_models/codesearch_contrastive_learning/Testing_data/testing_dataset_label.pth +3 -0
  24. saved_models/codesearch_contrastive_learning/Training_data/training_dataset_label.pth +3 -0
  25. saved_models/codesearch_contrastive_learning/config.json +101 -0
  26. saved_models/codesearch_contrastive_learning/config_dvi_modi.json +55 -0
  27. saved_models/codesearch_contrastive_learning/iteration_structure.json +12 -0
  28. saved_models/fine_tune/Ruby/running.log +215 -0
  29. saved_models/fine_tune/java/running.log +268 -0
  30. saved_models/fine_tune/ruby/0/model.bin +3 -0
  31. saved_models/fine_tune/ruby/1/all_code_vec.npy +3 -0
  32. saved_models/fine_tune/ruby/1/all_nl_vec.npy +3 -0
  33. saved_models/fine_tune/ruby/1/model.bin +3 -0
  34. saved_models/fine_tune/ruby/1/test_all_code_vec.npy +3 -0
  35. saved_models/fine_tune/ruby/1/test_all_nl_vec.npy +3 -0
  36. saved_models/fine_tune/ruby/2/all_code_vec.npy +3 -0
  37. saved_models/fine_tune/ruby/2/all_nl_vec.npy +3 -0
  38. saved_models/fine_tune/ruby/2/model.bin +3 -0
  39. saved_models/fine_tune/ruby/2/test_all_code_vec.npy +3 -0
  40. saved_models/fine_tune/ruby/2/test_all_nl_vec.npy +3 -0
  41. saved_models/fine_tune/ruby/3/all_code_vec.npy +3 -0
  42. saved_models/fine_tune/ruby/3/all_nl_vec.npy +3 -0
  43. saved_models/fine_tune/ruby/3/model.bin +3 -0
  44. saved_models/fine_tune/ruby/3/test_all_code_vec.npy +3 -0
  45. saved_models/fine_tune/ruby/3/test_all_nl_vec.npy +3 -0
  46. saved_models/fine_tune/ruby/4/model.bin +3 -0
  47. saved_models/fine_tune/ruby/checkpoint-best-mrr/model.bin +3 -0
  48. saved_models/fine_tune/ruby/docstring_list.json +0 -0
  49. saved_models/fine_tune/ruby/result.jsonl +1 -0
  50. saved_models/fine_tune/ruby/running.log +5 -0
saved_models/cocosoda/save_tokenizer.log ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 02/17/2024 15:12:04 - INFO - __main__ - device: cuda, n_gpu: 2
2
+ 02/17/2024 15:12:08 - INFO - __main__ - new token {'additional_special_tokens': ['global_variable', 'heredoc_end', 'decimal_floating_point_literal', 'rune_literal', 'int_literal', 'ERROR', 'class', 'heredoc_content', 'field_identifier', 'name', 'string', 'hash_key_symbol', 'hex_integer_literal', 'statement_identifier', 'boolean', 'separators', 'escape_sequence', 'boolean_type', 'regex_flags', 'string_fragment', 'identifier', 'instance_variable', 'regex_pattern', 'decimal_integer_literal', 'raw_string_literal', 'property_identifier', 'operator', 'label_name', 'namespace', 'string_literal', 'package_identifier', 'float_literal', 'integer', 'php_tag', 'shorthand_property_identifier', 'shorthand_property_identifier_pattern', 'extends', 'none', 'text', 'void_type', 'null_literal', 'heredoc_beginning', 'keyword', 'simple_symbol', 'type_identifier', 'character_literal', 'string_content', 'comment', 'number', '"', 'constant', 'class_variable']}
3
+ 02/17/2024 15:12:09 - INFO - __main__ - +-------------------------------------------------------------------+--------------+----------+
4
+ | Layer Name | Output Shape | Param # |
5
+ +-------------------------------------------------------------------+--------------+----------+
6
+ | code_encoder_q.embeddings.word_embeddings.weight | [51451, 768] | 39514368 |
7
+ | code_encoder_q.embeddings.position_embeddings.weight | [1026, 768] | 787968 |
8
+ | code_encoder_q.embeddings.token_type_embeddings.weight | [10, 768] | 7680 |
9
+ | code_encoder_q.embeddings.LayerNorm.weight | [768] | 768 |
10
+ | code_encoder_q.embeddings.LayerNorm.bias | [768] | 768 |
11
+ | code_encoder_q.encoder.layer.0.attention.self.query.weight | [768, 768] | 589824 |
12
+ | code_encoder_q.encoder.layer.0.attention.self.query.bias | [768] | 768 |
13
+ | code_encoder_q.encoder.layer.0.attention.self.key.weight | [768, 768] | 589824 |
14
+ | code_encoder_q.encoder.layer.0.attention.self.key.bias | [768] | 768 |
15
+ | code_encoder_q.encoder.layer.0.attention.self.value.weight | [768, 768] | 589824 |
16
+ | code_encoder_q.encoder.layer.0.attention.self.value.bias | [768] | 768 |
17
+ | code_encoder_q.encoder.layer.0.attention.output.dense.weight | [768, 768] | 589824 |
18
+ | code_encoder_q.encoder.layer.0.attention.output.dense.bias | [768] | 768 |
19
+ | code_encoder_q.encoder.layer.0.attention.output.LayerNorm.weight | [768] | 768 |
20
+ | code_encoder_q.encoder.layer.0.attention.output.LayerNorm.bias | [768] | 768 |
21
+ | code_encoder_q.encoder.layer.0.intermediate.dense.weight | [3072, 768] | 2359296 |
22
+ | code_encoder_q.encoder.layer.0.intermediate.dense.bias | [3072] | 3072 |
23
+ | code_encoder_q.encoder.layer.0.output.dense.weight | [768, 3072] | 2359296 |
24
+ | code_encoder_q.encoder.layer.0.output.dense.bias | [768] | 768 |
25
+ | code_encoder_q.encoder.layer.0.output.LayerNorm.weight | [768] | 768 |
26
+ | code_encoder_q.encoder.layer.0.output.LayerNorm.bias | [768] | 768 |
27
+ | code_encoder_q.encoder.layer.1.attention.self.query.weight | [768, 768] | 589824 |
28
+ | code_encoder_q.encoder.layer.1.attention.self.query.bias | [768] | 768 |
29
+ | code_encoder_q.encoder.layer.1.attention.self.key.weight | [768, 768] | 589824 |
30
+ | code_encoder_q.encoder.layer.1.attention.self.key.bias | [768] | 768 |
31
+ | code_encoder_q.encoder.layer.1.attention.self.value.weight | [768, 768] | 589824 |
32
+ | code_encoder_q.encoder.layer.1.attention.self.value.bias | [768] | 768 |
33
+ | code_encoder_q.encoder.layer.1.attention.output.dense.weight | [768, 768] | 589824 |
34
+ | code_encoder_q.encoder.layer.1.attention.output.dense.bias | [768] | 768 |
35
+ | code_encoder_q.encoder.layer.1.attention.output.LayerNorm.weight | [768] | 768 |
36
+ | code_encoder_q.encoder.layer.1.attention.output.LayerNorm.bias | [768] | 768 |
37
+ | code_encoder_q.encoder.layer.1.intermediate.dense.weight | [3072, 768] | 2359296 |
38
+ | code_encoder_q.encoder.layer.1.intermediate.dense.bias | [3072] | 3072 |
39
+ | code_encoder_q.encoder.layer.1.output.dense.weight | [768, 3072] | 2359296 |
40
+ | code_encoder_q.encoder.layer.1.output.dense.bias | [768] | 768 |
41
+ | code_encoder_q.encoder.layer.1.output.LayerNorm.weight | [768] | 768 |
42
+ | code_encoder_q.encoder.layer.1.output.LayerNorm.bias | [768] | 768 |
43
+ | code_encoder_q.encoder.layer.2.attention.self.query.weight | [768, 768] | 589824 |
44
+ | code_encoder_q.encoder.layer.2.attention.self.query.bias | [768] | 768 |
45
+ | code_encoder_q.encoder.layer.2.attention.self.key.weight | [768, 768] | 589824 |
46
+ | code_encoder_q.encoder.layer.2.attention.self.key.bias | [768] | 768 |
47
+ | code_encoder_q.encoder.layer.2.attention.self.value.weight | [768, 768] | 589824 |
48
+ | code_encoder_q.encoder.layer.2.attention.self.value.bias | [768] | 768 |
49
+ | code_encoder_q.encoder.layer.2.attention.output.dense.weight | [768, 768] | 589824 |
50
+ | code_encoder_q.encoder.layer.2.attention.output.dense.bias | [768] | 768 |
51
+ | code_encoder_q.encoder.layer.2.attention.output.LayerNorm.weight | [768] | 768 |
52
+ | code_encoder_q.encoder.layer.2.attention.output.LayerNorm.bias | [768] | 768 |
53
+ | code_encoder_q.encoder.layer.2.intermediate.dense.weight | [3072, 768] | 2359296 |
54
+ | code_encoder_q.encoder.layer.2.intermediate.dense.bias | [3072] | 3072 |
55
+ | code_encoder_q.encoder.layer.2.output.dense.weight | [768, 3072] | 2359296 |
56
+ | code_encoder_q.encoder.layer.2.output.dense.bias | [768] | 768 |
57
+ | code_encoder_q.encoder.layer.2.output.LayerNorm.weight | [768] | 768 |
58
+ | code_encoder_q.encoder.layer.2.output.LayerNorm.bias | [768] | 768 |
59
+ | code_encoder_q.encoder.layer.3.attention.self.query.weight | [768, 768] | 589824 |
60
+ | code_encoder_q.encoder.layer.3.attention.self.query.bias | [768] | 768 |
61
+ | code_encoder_q.encoder.layer.3.attention.self.key.weight | [768, 768] | 589824 |
62
+ | code_encoder_q.encoder.layer.3.attention.self.key.bias | [768] | 768 |
63
+ | code_encoder_q.encoder.layer.3.attention.self.value.weight | [768, 768] | 589824 |
64
+ | code_encoder_q.encoder.layer.3.attention.self.value.bias | [768] | 768 |
65
+ | code_encoder_q.encoder.layer.3.attention.output.dense.weight | [768, 768] | 589824 |
66
+ | code_encoder_q.encoder.layer.3.attention.output.dense.bias | [768] | 768 |
67
+ | code_encoder_q.encoder.layer.3.attention.output.LayerNorm.weight | [768] | 768 |
68
+ | code_encoder_q.encoder.layer.3.attention.output.LayerNorm.bias | [768] | 768 |
69
+ | code_encoder_q.encoder.layer.3.intermediate.dense.weight | [3072, 768] | 2359296 |
70
+ | code_encoder_q.encoder.layer.3.intermediate.dense.bias | [3072] | 3072 |
71
+ | code_encoder_q.encoder.layer.3.output.dense.weight | [768, 3072] | 2359296 |
72
+ | code_encoder_q.encoder.layer.3.output.dense.bias | [768] | 768 |
73
+ | code_encoder_q.encoder.layer.3.output.LayerNorm.weight | [768] | 768 |
74
+ | code_encoder_q.encoder.layer.3.output.LayerNorm.bias | [768] | 768 |
75
+ | code_encoder_q.encoder.layer.4.attention.self.query.weight | [768, 768] | 589824 |
76
+ | code_encoder_q.encoder.layer.4.attention.self.query.bias | [768] | 768 |
77
+ | code_encoder_q.encoder.layer.4.attention.self.key.weight | [768, 768] | 589824 |
78
+ | code_encoder_q.encoder.layer.4.attention.self.key.bias | [768] | 768 |
79
+ | code_encoder_q.encoder.layer.4.attention.self.value.weight | [768, 768] | 589824 |
80
+ | code_encoder_q.encoder.layer.4.attention.self.value.bias | [768] | 768 |
81
+ | code_encoder_q.encoder.layer.4.attention.output.dense.weight | [768, 768] | 589824 |
82
+ | code_encoder_q.encoder.layer.4.attention.output.dense.bias | [768] | 768 |
83
+ | code_encoder_q.encoder.layer.4.attention.output.LayerNorm.weight | [768] | 768 |
84
+ | code_encoder_q.encoder.layer.4.attention.output.LayerNorm.bias | [768] | 768 |
85
+ | code_encoder_q.encoder.layer.4.intermediate.dense.weight | [3072, 768] | 2359296 |
86
+ | code_encoder_q.encoder.layer.4.intermediate.dense.bias | [3072] | 3072 |
87
+ | code_encoder_q.encoder.layer.4.output.dense.weight | [768, 3072] | 2359296 |
88
+ | code_encoder_q.encoder.layer.4.output.dense.bias | [768] | 768 |
89
+ | code_encoder_q.encoder.layer.4.output.LayerNorm.weight | [768] | 768 |
90
+ | code_encoder_q.encoder.layer.4.output.LayerNorm.bias | [768] | 768 |
91
+ | code_encoder_q.encoder.layer.5.attention.self.query.weight | [768, 768] | 589824 |
92
+ | code_encoder_q.encoder.layer.5.attention.self.query.bias | [768] | 768 |
93
+ | code_encoder_q.encoder.layer.5.attention.self.key.weight | [768, 768] | 589824 |
94
+ | code_encoder_q.encoder.layer.5.attention.self.key.bias | [768] | 768 |
95
+ | code_encoder_q.encoder.layer.5.attention.self.value.weight | [768, 768] | 589824 |
96
+ | code_encoder_q.encoder.layer.5.attention.self.value.bias | [768] | 768 |
97
+ | code_encoder_q.encoder.layer.5.attention.output.dense.weight | [768, 768] | 589824 |
98
+ | code_encoder_q.encoder.layer.5.attention.output.dense.bias | [768] | 768 |
99
+ | code_encoder_q.encoder.layer.5.attention.output.LayerNorm.weight | [768] | 768 |
100
+ | code_encoder_q.encoder.layer.5.attention.output.LayerNorm.bias | [768] | 768 |
101
+ | code_encoder_q.encoder.layer.5.intermediate.dense.weight | [3072, 768] | 2359296 |
102
+ | code_encoder_q.encoder.layer.5.intermediate.dense.bias | [3072] | 3072 |
103
+ | code_encoder_q.encoder.layer.5.output.dense.weight | [768, 3072] | 2359296 |
104
+ | code_encoder_q.encoder.layer.5.output.dense.bias | [768] | 768 |
105
+ | code_encoder_q.encoder.layer.5.output.LayerNorm.weight | [768] | 768 |
106
+ | code_encoder_q.encoder.layer.5.output.LayerNorm.bias | [768] | 768 |
107
+ | code_encoder_q.encoder.layer.6.attention.self.query.weight | [768, 768] | 589824 |
108
+ | code_encoder_q.encoder.layer.6.attention.self.query.bias | [768] | 768 |
109
+ | code_encoder_q.encoder.layer.6.attention.self.key.weight | [768, 768] | 589824 |
110
+ | code_encoder_q.encoder.layer.6.attention.self.key.bias | [768] | 768 |
111
+ | code_encoder_q.encoder.layer.6.attention.self.value.weight | [768, 768] | 589824 |
112
+ | code_encoder_q.encoder.layer.6.attention.self.value.bias | [768] | 768 |
113
+ | code_encoder_q.encoder.layer.6.attention.output.dense.weight | [768, 768] | 589824 |
114
+ | code_encoder_q.encoder.layer.6.attention.output.dense.bias | [768] | 768 |
115
+ | code_encoder_q.encoder.layer.6.attention.output.LayerNorm.weight | [768] | 768 |
116
+ | code_encoder_q.encoder.layer.6.attention.output.LayerNorm.bias | [768] | 768 |
117
+ | code_encoder_q.encoder.layer.6.intermediate.dense.weight | [3072, 768] | 2359296 |
118
+ | code_encoder_q.encoder.layer.6.intermediate.dense.bias | [3072] | 3072 |
119
+ | code_encoder_q.encoder.layer.6.output.dense.weight | [768, 3072] | 2359296 |
120
+ | code_encoder_q.encoder.layer.6.output.dense.bias | [768] | 768 |
121
+ | code_encoder_q.encoder.layer.6.output.LayerNorm.weight | [768] | 768 |
122
+ | code_encoder_q.encoder.layer.6.output.LayerNorm.bias | [768] | 768 |
123
+ | code_encoder_q.encoder.layer.7.attention.self.query.weight | [768, 768] | 589824 |
124
+ | code_encoder_q.encoder.layer.7.attention.self.query.bias | [768] | 768 |
125
+ | code_encoder_q.encoder.layer.7.attention.self.key.weight | [768, 768] | 589824 |
126
+ | code_encoder_q.encoder.layer.7.attention.self.key.bias | [768] | 768 |
127
+ | code_encoder_q.encoder.layer.7.attention.self.value.weight | [768, 768] | 589824 |
128
+ | code_encoder_q.encoder.layer.7.attention.self.value.bias | [768] | 768 |
129
+ | code_encoder_q.encoder.layer.7.attention.output.dense.weight | [768, 768] | 589824 |
130
+ | code_encoder_q.encoder.layer.7.attention.output.dense.bias | [768] | 768 |
131
+ | code_encoder_q.encoder.layer.7.attention.output.LayerNorm.weight | [768] | 768 |
132
+ | code_encoder_q.encoder.layer.7.attention.output.LayerNorm.bias | [768] | 768 |
133
+ | code_encoder_q.encoder.layer.7.intermediate.dense.weight | [3072, 768] | 2359296 |
134
+ | code_encoder_q.encoder.layer.7.intermediate.dense.bias | [3072] | 3072 |
135
+ | code_encoder_q.encoder.layer.7.output.dense.weight | [768, 3072] | 2359296 |
136
+ | code_encoder_q.encoder.layer.7.output.dense.bias | [768] | 768 |
137
+ | code_encoder_q.encoder.layer.7.output.LayerNorm.weight | [768] | 768 |
138
+ | code_encoder_q.encoder.layer.7.output.LayerNorm.bias | [768] | 768 |
139
+ | code_encoder_q.encoder.layer.8.attention.self.query.weight | [768, 768] | 589824 |
140
+ | code_encoder_q.encoder.layer.8.attention.self.query.bias | [768] | 768 |
141
+ | code_encoder_q.encoder.layer.8.attention.self.key.weight | [768, 768] | 589824 |
142
+ | code_encoder_q.encoder.layer.8.attention.self.key.bias | [768] | 768 |
143
+ | code_encoder_q.encoder.layer.8.attention.self.value.weight | [768, 768] | 589824 |
144
+ | code_encoder_q.encoder.layer.8.attention.self.value.bias | [768] | 768 |
145
+ | code_encoder_q.encoder.layer.8.attention.output.dense.weight | [768, 768] | 589824 |
146
+ | code_encoder_q.encoder.layer.8.attention.output.dense.bias | [768] | 768 |
147
+ | code_encoder_q.encoder.layer.8.attention.output.LayerNorm.weight | [768] | 768 |
148
+ | code_encoder_q.encoder.layer.8.attention.output.LayerNorm.bias | [768] | 768 |
149
+ | code_encoder_q.encoder.layer.8.intermediate.dense.weight | [3072, 768] | 2359296 |
150
+ | code_encoder_q.encoder.layer.8.intermediate.dense.bias | [3072] | 3072 |
151
+ | code_encoder_q.encoder.layer.8.output.dense.weight | [768, 3072] | 2359296 |
152
+ | code_encoder_q.encoder.layer.8.output.dense.bias | [768] | 768 |
153
+ | code_encoder_q.encoder.layer.8.output.LayerNorm.weight | [768] | 768 |
154
+ | code_encoder_q.encoder.layer.8.output.LayerNorm.bias | [768] | 768 |
155
+ | code_encoder_q.encoder.layer.9.attention.self.query.weight | [768, 768] | 589824 |
156
+ | code_encoder_q.encoder.layer.9.attention.self.query.bias | [768] | 768 |
157
+ | code_encoder_q.encoder.layer.9.attention.self.key.weight | [768, 768] | 589824 |
158
+ | code_encoder_q.encoder.layer.9.attention.self.key.bias | [768] | 768 |
159
+ | code_encoder_q.encoder.layer.9.attention.self.value.weight | [768, 768] | 589824 |
160
+ | code_encoder_q.encoder.layer.9.attention.self.value.bias | [768] | 768 |
161
+ | code_encoder_q.encoder.layer.9.attention.output.dense.weight | [768, 768] | 589824 |
162
+ | code_encoder_q.encoder.layer.9.attention.output.dense.bias | [768] | 768 |
163
+ | code_encoder_q.encoder.layer.9.attention.output.LayerNorm.weight | [768] | 768 |
164
+ | code_encoder_q.encoder.layer.9.attention.output.LayerNorm.bias | [768] | 768 |
165
+ | code_encoder_q.encoder.layer.9.intermediate.dense.weight | [3072, 768] | 2359296 |
166
+ | code_encoder_q.encoder.layer.9.intermediate.dense.bias | [3072] | 3072 |
167
+ | code_encoder_q.encoder.layer.9.output.dense.weight | [768, 3072] | 2359296 |
168
+ | code_encoder_q.encoder.layer.9.output.dense.bias | [768] | 768 |
169
+ | code_encoder_q.encoder.layer.9.output.LayerNorm.weight | [768] | 768 |
170
+ | code_encoder_q.encoder.layer.9.output.LayerNorm.bias | [768] | 768 |
171
+ | code_encoder_q.encoder.layer.10.attention.self.query.weight | [768, 768] | 589824 |
172
+ | code_encoder_q.encoder.layer.10.attention.self.query.bias | [768] | 768 |
173
+ | code_encoder_q.encoder.layer.10.attention.self.key.weight | [768, 768] | 589824 |
174
+ | code_encoder_q.encoder.layer.10.attention.self.key.bias | [768] | 768 |
175
+ | code_encoder_q.encoder.layer.10.attention.self.value.weight | [768, 768] | 589824 |
176
+ | code_encoder_q.encoder.layer.10.attention.self.value.bias | [768] | 768 |
177
+ | code_encoder_q.encoder.layer.10.attention.output.dense.weight | [768, 768] | 589824 |
178
+ | code_encoder_q.encoder.layer.10.attention.output.dense.bias | [768] | 768 |
179
+ | code_encoder_q.encoder.layer.10.attention.output.LayerNorm.weight | [768] | 768 |
180
+ | code_encoder_q.encoder.layer.10.attention.output.LayerNorm.bias | [768] | 768 |
181
+ | code_encoder_q.encoder.layer.10.intermediate.dense.weight | [3072, 768] | 2359296 |
182
+ | code_encoder_q.encoder.layer.10.intermediate.dense.bias | [3072] | 3072 |
183
+ | code_encoder_q.encoder.layer.10.output.dense.weight | [768, 3072] | 2359296 |
184
+ | code_encoder_q.encoder.layer.10.output.dense.bias | [768] | 768 |
185
+ | code_encoder_q.encoder.layer.10.output.LayerNorm.weight | [768] | 768 |
186
+ | code_encoder_q.encoder.layer.10.output.LayerNorm.bias | [768] | 768 |
187
+ | code_encoder_q.encoder.layer.11.attention.self.query.weight | [768, 768] | 589824 |
188
+ | code_encoder_q.encoder.layer.11.attention.self.query.bias | [768] | 768 |
189
+ | code_encoder_q.encoder.layer.11.attention.self.key.weight | [768, 768] | 589824 |
190
+ | code_encoder_q.encoder.layer.11.attention.self.key.bias | [768] | 768 |
191
+ | code_encoder_q.encoder.layer.11.attention.self.value.weight | [768, 768] | 589824 |
192
+ | code_encoder_q.encoder.layer.11.attention.self.value.bias | [768] | 768 |
193
+ | code_encoder_q.encoder.layer.11.attention.output.dense.weight | [768, 768] | 589824 |
194
+ | code_encoder_q.encoder.layer.11.attention.output.dense.bias | [768] | 768 |
195
+ | code_encoder_q.encoder.layer.11.attention.output.LayerNorm.weight | [768] | 768 |
196
+ | code_encoder_q.encoder.layer.11.attention.output.LayerNorm.bias | [768] | 768 |
197
+ | code_encoder_q.encoder.layer.11.intermediate.dense.weight | [3072, 768] | 2359296 |
198
+ | code_encoder_q.encoder.layer.11.intermediate.dense.bias | [3072] | 3072 |
199
+ | code_encoder_q.encoder.layer.11.output.dense.weight | [768, 3072] | 2359296 |
200
+ | code_encoder_q.encoder.layer.11.output.dense.bias | [768] | 768 |
201
+ | code_encoder_q.encoder.layer.11.output.LayerNorm.weight | [768] | 768 |
202
+ | code_encoder_q.encoder.layer.11.output.LayerNorm.bias | [768] | 768 |
203
+ | code_encoder_q.pooler.dense.weight | [768, 768] | 589824 |
204
+ | code_encoder_q.pooler.dense.bias | [768] | 768 |
205
+ +-------------------------------------------------------------------+--------------+----------+
206
+ 02/17/2024 15:12:09 - INFO - __main__ - Training/evaluation parameters Namespace(agg_way='cls_pooler', aug_type_way='random_replace_type', code_length=64, codebase_file='dataset/ruby/codebase.jsonl', config_name='microsoft/unixcoder-base', couninue_pre_train_data_files=['dataset/java/train.jsonl', 'dataset/javascript/train.jsonl', 'dataset/python/train.jsonl', 'dataset/php/train.jsonl', 'dataset/go/train.jsonl', 'dataset/ruby/train.jsonl'], data_aug_type='other', data_flow_length=0, debug=False, device=device(type='cuda'), do_avg=False, do_continue_pre_trained=False, do_eval=False, do_fine_tune=False, do_ineer_loss=False, do_multi_lang_continue_pre_train=True, do_single_lang_continue_pre_train=False, do_test=True, do_train=False, do_whitening=False, do_zero_short=False, epoch=50, eval_batch_size=64, eval_data_file='dataset/ruby/valid.jsonl', eval_frequency=100, fp16=False, gradient_accumulation_steps=1, hidden_size=768, lang='ruby', learning_rate=2e-05, loaded_codebert_model_filename=None, loaded_model_filename=None, local_rank=-1, logging_steps=50, max_codeblock_num=10, max_grad_norm=1.0, max_steps=100000, mlm_probability=0.1, mlp=False, moco_dim=768, moco_k=1024, moco_m=0.999, moco_t=0.07, moco_type='encoder_queue', model_name_or_path='microsoft/unixcoder-base', model_type='multi-loss-cocosoda', n_debug_samples=100, n_gpu=2, nl_length=64, num_train_epochs=10, num_warmup_steps=0, only_save_the_nl_code_vec=False, output_dir='./saved_models/cocosoda/', print_align_unif_loss=False, save_evaluation_reuslt=False, save_evaluation_reuslt_dir=None, save_steps=1000, seed=123456, test_data_file='dataset/ruby/test.jsonl', time_score=1, tokenizer_name='microsoft/unixcoder-base', train_batch_size=128, train_data_file='dataset/ruby/train.jsonl', use_best_mrr_model=False, weight_decay=0.01)
207
+ 02/17/2024 15:15:03 - INFO - __main__ - *** Example ***
208
+ 02/17/2024 15:15:03 - INFO - __main__ - idx: 0
209
+ 02/17/2024 15:15:03 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', '@', '_Override', '_public', '_Image', 'Source', '_apply', '_(', '_Image', 'Source', '_input', '_)', '_{', '_final', '_int', '_[', '_]', '_[', '_]', '_pixel', 'Matrix', '_=', '_new', '_int', '_[', '_3', '_]', '_[', '_3', '_]', '_;', '_int', '_w', '_=', '_input', '_.', '_getWidth', '_(', '_)', '_;', '_int', '_h', '_=', '_input', '_.', '_getHeight', '_(', '_)', '_;', '_int', '_[', '_]', '_[', '_]', '_output', '_=', '_new', '_int', '_[', '_h', '_]', '</s>']
210
+ 02/17/2024 15:15:03 - INFO - __main__ - code_ids: 0 6 2 150 19505 1240 6085 1768 5230 400 6085 1768 1586 743 399 1920 554 626 2406 626 2406 5578 3679 385 579 554 626 995 2406 626 995 2406 2476 554 477 385 1586 746 32671 400 743 2476 554 566 385 1586 746 32720 400 743 2476 554 626 2406 626 2406 1721 385 579 554 626 566 2406 2
211
+ 02/17/2024 15:15:03 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Expect', 's', '_a', '_height', '_mat', '_as', '_input', '</s>']
212
+ 02/17/2024 15:15:03 - INFO - __main__ - nl_ids: 0 6 2 7871 201 434 3082 5772 880 1586 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
213
+ 02/17/2024 15:15:03 - INFO - __main__ - *** Example ***
214
+ 02/17/2024 15:15:03 - INFO - __main__ - idx: 1
215
+ 02/17/2024 15:15:03 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'public', '_<', '_L', 'extends', 'Listener', '_>', '_void', '_pop', 'Event', '_(', '_Event', '_<', '_?', '_,', '_L', '_>', '_expected', '_)', '_{', '_synchronized', '_(', '_this', '_.', '_stack', '_)', '_{', '_final', '_Event', '_<', '_?', '_,', '_?', '_>', '_actual', '_=', '_this', '_.', '_stack', '_.', '_pop', '_(', '_)', '_;', '_if', '_(', '_actual', '_!=', '_expected', '_)', '_{', '_throw', '_new', '_IllegalStateException', '_(', '_String', '_.', '_format', '_(', '"', 'Un', '</s>']
216
+ 02/17/2024 15:15:03 - INFO - __main__ - code_ids: 0 6 2 653 517 747 13125 2486 711 723 5012 1089 400 3916 517 999 2019 747 711 2048 743 399 9401 400 547 746 3325 743 399 1920 3916 517 999 2019 999 711 3780 385 547 746 3325 746 5012 400 743 2476 462 400 3780 620 2048 743 399 1185 579 16219 400 1167 746 2021 400 120 965 2
217
+ 02/17/2024 15:15:03 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'P', 'ops', '_the', '_top', '_event', '_off', '_the', '_current', '_event', '_stack', '_.', '_This', '_action', '_has', '_to', '_be', '_performed', '_immediately', '_after', '_the', '_event', '_has', '_been', '_dispatched', '_to', '_all', '_listeners', '_.', '</s>']
218
+ 02/17/2024 15:15:03 - INFO - __main__ - nl_ids: 0 6 2 166 2489 448 3194 1488 3413 448 1434 1488 3325 746 1600 2657 1559 508 661 13181 10086 2493 448 1488 1559 3022 43340 508 1345 11839 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
219
+ 02/17/2024 15:15:03 - INFO - __main__ - *** Example ***
220
+ 02/17/2024 15:15:03 - INFO - __main__ - idx: 2
221
+ 02/17/2024 15:15:03 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'protected', '_void', '_modify', '_(', '_Transaction', '_t', '_)', '_{', '_try', '_{', '_this', '_.', '_lock', '_.', '_write', 'Lock', '_(', '_)', '_.', '_lock', '_(', '_)', '_;', '_t', '_.', '_perform', '_(', '_)', '_;', '_}', '_finally', '_{', '_this', '_.', '_lock', '_.', '_write', 'Lock', '_(', '_)', '_.', '_unlock', '_(', '_)', '_;', '_}', '_}', '</s>']
222
+ 02/17/2024 15:15:03 - INFO - __main__ - code_ids: 0 6 2 1933 723 8660 400 13081 422 743 399 1568 399 547 746 3505 746 2250 2896 400 743 746 3505 400 743 2476 422 746 4729 400 743 2476 425 6110 399 547 746 3505 746 2250 2896 400 743 746 14552 400 743 2476 425 425 2 1 1 1 1 1 1 1 1 1 1 1 1 1
223
+ 02/17/2024 15:15:03 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Executes', '_the', '_given', '_transaction', '_within', '_the', '_con', 'text', 'of', '_a', '_write', '_lock', '_.', '</s>']
224
+ 02/17/2024 15:15:03 - INFO - __main__ - nl_ids: 0 6 2 40551 448 2076 4993 5289 448 549 625 757 434 2250 3505 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
225
+ 02/17/2024 15:15:59 - INFO - __main__ - *** Example ***
226
+ 02/17/2024 15:15:59 - INFO - __main__ - idx: 0
227
+ 02/17/2024 15:15:59 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'function', '_(', '_state', '_,', '_action', '_)', '_{', '_return', '__', '_.', '_defaults', '_(', '_{', '_isValid', 'ating', '_:', '_action', '_.', '_isValid', 'ating', '_,', '_last', 'Action', '_:', '_IS', '_', 'VALID', 'ATING', '_}', '_,', '_state', '_)', '_}', '</s>']
228
+ 02/17/2024 15:15:59 - INFO - __main__ - code_ids: 0 6 2 618 400 1404 2019 2657 743 399 483 623 746 7470 400 399 17002 2335 545 2657 746 17002 2335 2019 2023 1888 545 1947 181 7477 40173 425 2019 1404 743 425 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
229
+ 02/17/2024 15:15:59 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Update', '_is', '_validating', '_result', '</s>']
230
+ 02/17/2024 15:15:59 - INFO - __main__ - nl_ids: 0 6 2 2056 555 38924 1046 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
231
+ 02/17/2024 15:15:59 - INFO - __main__ - *** Example ***
232
+ 02/17/2024 15:15:59 - INFO - __main__ - idx: 1
233
+ 02/17/2024 15:15:59 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'function', '_add', 'Widget', 'For', 'Filter', '_(', '_view', '_,', '_filter', '_,', '_edit', 'Mode', 'Hint', '_)', '_{', '_var', '_grid', 'ster', '_=', '_view', '_.', '__', 'widgets', 'Grid', 'ster', '_;', '_var', '_row', '_=', '_filter', '_.', '_row', '_||', '_1', '_;', '_var', '_col', '_=', '_filter', '_.', '_col', '_||', '_1', '_;', '_var', '_size', 'X', '_=', '_filter', '_.', '_size', '_', 'x', '_||', '_3', '_;', '_var', '_size', 'Y', '_=', '</s>']
234
+ 02/17/2024 15:15:59 - INFO - __main__ - code_ids: 0 6 2 618 1103 3104 1459 2274 400 2859 2019 2866 2019 7277 1649 7641 743 399 660 6335 7400 385 2859 746 623 14718 3981 7400 2476 660 2562 385 2866 746 2562 853 524 2476 660 1253 385 2866 746 1253 853 524 2476 660 1014 174 385 2866 746 1014 181 206 853 995 2476 660 1014 175 385 2
235
+ 02/17/2024 15:15:59 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Add', '_a', '_widget', '_to', '_the', '_analyze', '_page', '_for', '_the', '_given', '_filter', '</s>']
236
+ 02/17/2024 15:15:59 - INFO - __main__ - nl_ids: 0 6 2 972 434 6949 508 448 25087 2303 563 448 2076 2866 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
237
+ 02/17/2024 15:15:59 - INFO - __main__ - *** Example ***
238
+ 02/17/2024 15:15:59 - INFO - __main__ - idx: 2
239
+ 02/17/2024 15:15:59 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'function', '_in', 'Range', '_(', '_value', '_,', '_min', '_,', '_max', '_)', '_{', '_const', '_int', '_=', '_parseInt', '_(', '_value', '_,', '_10', '_)', '_return', '_(', '_`', '_${', '_int', '_}', '_`', '_===', '_`', '_${', '_value', '_.', '_replace', '_(', '_/', '_^', '0', '_/', '_,', "_''", '_)', '_}', '_`', '_&&', '_int', '_>=', '_min', '_&&', '_int', '_<=', '_max', '_)', '_}', '</s>']
240
+ 02/17/2024 15:15:59 - INFO - __main__ - code_ids: 0 6 2 618 488 2228 400 767 2019 2069 2019 1621 743 399 925 554 385 9998 400 767 2019 1865 743 483 400 1222 5593 554 425 1222 1246 1222 5593 767 746 4126 400 1017 3855 134 1017 2019 3606 743 425 1222 698 554 1451 2069 698 554 1826 1621 743 425 2 1 1 1 1 1 1 1
241
+ 02/17/2024 15:15:59 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Determine', '_if', '_value', '_is', '_within', '_a', '_numeric', '_range', '</s>']
242
+ 02/17/2024 15:15:59 - INFO - __main__ - nl_ids: 0 6 2 17591 462 767 555 5289 434 10397 1780 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
243
+ 02/17/2024 15:19:33 - INFO - __main__ - *** Example ***
244
+ 02/17/2024 15:19:33 - INFO - __main__ - idx: 0
245
+ 02/17/2024 15:19:33 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'def', '_split', '_', 'phy', 'log', 'en', 'y', '_(', '_p', '_,', '_level', '_=', '"', 's', '"', ')', '_:', '_level', '_=', '_level', '_+', '"', '__', '"', 'result', '_=', '_p', '_.', '_split', '_(', '_level', '_)', '_return', '_result', '_[', '_0', '_]', '_+', '_level', '_+', '_result', '_[', '_1', '_]', '_.', '_split', '_(', '"', ';', '"', ')', '_[', '_0', '_]', '</s>']
246
+ 02/17/2024 15:19:33 - INFO - __main__ - code_ids: 0 6 2 729 5192 181 3258 896 386 207 400 428 2019 3144 385 120 201 120 127 545 3144 385 3144 513 120 876 120 1125 385 428 746 5192 400 3144 743 483 1046 626 461 2406 513 3144 513 1046 626 524 2406 746 5192 400 120 145 120 127 626 461 2406 2 1 1 1 1 1 1
247
+ 02/17/2024 15:19:33 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Return', '_either', '_the', '_full', '_or', '_truncated', '_version', '_of', '_a', '_Q', 'II', 'ME', '_-', '_formatted', '_taxonomy', 'string', '.', '</s>']
248
+ 02/17/2024 15:19:33 - INFO - __main__ - nl_ids: 0 6 2 1675 4759 448 3662 872 19307 2229 595 434 1152 4300 1098 581 10440 29021 571 132 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
249
+ 02/17/2024 15:19:33 - INFO - __main__ - *** Example ***
250
+ 02/17/2024 15:19:33 - INFO - __main__ - idx: 1
251
+ 02/17/2024 15:19:33 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'def', '_ensure', '_', 'dir', '_(', '_d', '_)', '_:', '_if', '_not', '_os', '_.', '_path', '_.', '_exists', '_(', '_d', '_)', '_:', '_try', '_:', '_os', '_.', '_m', 'akedirs', '_(', '_d', '_)', '_except', '_OSError', '_as', '_oe', '_:', '_#', '_should', '_not', '_happen', '_with', '_os', '.', 'makedirs', '_#', '_ENOENT', ':', '_No', '_such', '_file', '_or', '_directory', '_if', '_os', '_.', '_errno', '_==', '_errno', '_.', '_ENOENT', '_:', '_msg', '_=', '</s>']
252
+ 02/17/2024 15:19:33 - INFO - __main__ - code_ids: 0 6 2 729 6229 181 1282 400 480 743 545 462 800 2215 746 1391 746 4534 400 480 743 545 1568 545 2215 746 446 23328 400 480 743 3552 22934 880 44902 545 830 1570 800 7564 918 2215 132 24429 830 41059 144 4038 5632 1012 872 3456 462 2215 746 2341 550 2341 746 41059 545 2345 385 2
253
+ 02/17/2024 15:19:33 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Check', '_to', '_make', '_sure', '_the', '_supplied', '_directory', '_path', '_does', '_not', '_exist', '_if', '_so', '_create', '_it', '_.', '_The', '_method', '_catch', 'es', '_OSError', '_exceptions', '_and', '_returns', '_a', '_desc', 'riptive', '_message', '_instead', '_of', '_re', '_-', '_raising', '_the', '_error', '_.', '</s>']
254
+ 02/17/2024 15:19:33 - INFO - __main__ - nl_ids: 0 6 2 1749 508 2002 3984 448 8813 3456 1391 2129 800 3040 462 1769 1738 835 746 1044 1454 2092 482 22934 12300 706 2060 434 2162 44105 1841 4488 595 479 581 47183 448 843 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
255
+ 02/17/2024 15:19:33 - INFO - __main__ - *** Example ***
256
+ 02/17/2024 15:19:33 - INFO - __main__ - idx: 2
257
+ 02/17/2024 15:19:33 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'def', '_file', '_', 'handle', '_(', '_fn', 'h', '_,', '_mode', '_=', '"', 'r', 'U', '"', ')', '_:', '_handle', '_=', '_None', '_if', '_isinstance', '_(', '_fn', 'h', '_,', '_file', '_)', '_:', '_if', '_fn', 'h', '_.', '_closed', '_:', '_raise', '_ValueError', '_(', '"', 'Input', '_file', '_is', '_closed', '.', '"', ')', '_handle', '_=', '_fn', 'h', '_elif', '_isinstance', '_(', '_fn', 'h', '_,', '_str', '_)', '_:', '_handle', '_=', '</s>']
258
+ 02/17/2024 15:19:33 - INFO - __main__ - code_ids: 0 6 2 729 1012 181 2133 400 4065 190 2019 2119 385 120 200 171 120 127 545 2384 385 1938 462 5408 400 4065 190 2019 1012 743 545 462 4065 190 746 8264 545 3085 6052 400 120 1834 1012 555 8264 132 120 127 2384 385 4065 190 3625 5408 400 4065 190 2019 1113 743 545 2384 385 2
259
+ 02/17/2024 15:19:33 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Takes', '_either', '_a', '_file', '_path', '_or', '_an', '_open', '_file', '_handle', '_checks', '_validity', '_and', '_returns', '_an', '_open', '_file', '_handle', '_or', '_raises', '_an', '_appropriate', '_Exception', '_.', '</s>']
260
+ 02/17/2024 15:19:33 - INFO - __main__ - nl_ids: 0 6 2 27408 4759 434 1012 1391 872 817 2717 1012 2384 7825 25911 706 2060 817 2717 1012 2384 872 23154 817 7900 2654 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
261
+ 02/17/2024 15:23:02 - INFO - __main__ - *** Example ***
262
+ 02/17/2024 15:23:02 - INFO - __main__ - idx: 0
263
+ 02/17/2024 15:23:02 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'public', '_function', '_on', 'Channel', 'Pre', 'Delete', '_(', '_Resource', 'Controller', 'Event', '_$', '_event', '_)', '_:', '_void', '_{', '_$', '_channel', '_=', '_$', '_event', '_->', '_get', 'Subject', '_(', '_)', '_;', '_if', '_(', '_!', '_$', '_channel', '_instanceof', '_Channel', 'Interface', '_)', '_{', '_throw', '_new', '_Unexpected', 'TypeException', '_(', '_$', '_channel', '_,', '_Channel', 'Interface', '_::', 'class', ')', '_;', '_}', '_$', '_results', '_=', '_$', '_this', '_->', '_channel', 'Repository', '</s>']
264
+ 02/17/2024 15:23:02 - INFO - __main__ - code_ids: 0 6 2 653 603 854 3267 1782 2843 400 7606 3357 1089 440 1488 743 545 723 399 440 3225 385 440 1488 1703 744 7562 400 743 2476 462 400 552 440 3225 3052 11322 2285 743 399 1185 579 23297 48098 400 440 3225 2019 11322 2285 5431 1149 127 2476 425 440 3286 385 440 547 1703 3225 5674 2
265
+ 02/17/2024 15:23:02 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Prevent', '_channel', '_deletion', '_if', '_no', '_more', '_channels', '_enabled', '_.', '</s>']
266
+ 02/17/2024 15:23:02 - INFO - __main__ - nl_ids: 0 6 2 42669 3225 19744 462 1375 2726 8630 5334 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
267
+ 02/17/2024 15:23:02 - INFO - __main__ - *** Example ***
268
+ 02/17/2024 15:23:02 - INFO - __main__ - idx: 1
269
+ 02/17/2024 15:23:02 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'public', '_function', '_get', 'Tax', 'Total', '_(', '_)', '_:', '_int', '_{', '_$', '_tax', 'Total', '_=', '_0', '_;', '_foreach', '_(', '_$', '_this', '_->', '_get', 'Adjustments', '_(', '_Adjust', 'ment', 'Interface', '_::', '_T', 'AX', '_', 'ADJUST', 'MENT', '_)', '_as', '_$', '_tax', 'Adjustment', '_)', '_{', '_$', '_tax', 'Total', '_+=', '_$', '_tax', 'Adjustment', '_->', '_get', 'Amount', '_(', '_)', '_;', '_}', '_foreach', '_(', '_$', '_this', '_->', '_units', '</s>']
270
+ 02/17/2024 15:23:02 - INFO - __main__ - code_ids: 0 6 2 653 603 744 11266 4703 400 743 545 554 399 440 14990 4703 385 461 2476 2315 400 440 547 1703 744 39930 400 16203 564 2285 5431 515 3383 181 44094 4332 743 880 440 14990 21585 743 399 440 14990 4703 1054 440 14990 21585 1703 744 6933 400 743 2476 425 2315 400 440 547 1703 10931 2
271
+ 02/17/2024 15:23:02 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Returns', '_sum', '_of', '_ne', 'utral', '_and', '_non', '_ne', 'utral', '_tax', '_adjust', 'ments', '_on', '_order', '_item', '_and', '_total', '_tax', '_of', '_units', '_.', '</s>']
272
+ 02/17/2024 15:23:02 - INFO - __main__ - nl_ids: 0 6 2 2853 3863 595 1472 22943 706 2514 1472 22943 14990 7780 2067 854 2991 1573 706 3704 14990 595 10931 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
273
+ 02/17/2024 15:23:02 - INFO - __main__ - *** Example ***
274
+ 02/17/2024 15:23:02 - INFO - __main__ - idx: 2
275
+ 02/17/2024 15:23:02 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'private', '_function', '_is', 'Last', 'Enabled', 'Entity', '_(', '_$', '_result', '_,', '_$', '_entity', '_)', '_:', '_bool', '_{', '_return', '_!', '_$', '_result', '_||', '_0', '_===', '_count', '_(', '_$', '_result', '_)', '_||', '_(', '_1', '_===', '_count', '_(', '_$', '_result', '_)', '_&&', '_$', '_entity', '_===', '_(', '_$', '_result', '_instanceof', '_\\', '_Iterator', '_?', '_$', '_result', '_->', '_current', '_(', '_)', '_:', '_current', '_(', '_$', '_result', '_)', '</s>']
276
+ 02/17/2024 15:23:02 - INFO - __main__ - code_ids: 0 6 2 1335 603 555 2954 3060 2268 400 440 1046 2019 440 4498 743 545 1223 399 483 552 440 1046 853 461 1246 1752 400 440 1046 743 853 400 524 1246 1752 400 440 1046 743 698 440 4498 1246 400 440 1046 3052 1216 13119 999 440 1046 1703 1434 400 743 545 1434 400 440 1046 743 2
277
+ 02/17/2024 15:23:02 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'If', '_no', '_entity', '_matched', '_the', '_query', '_criteria', '_or', '_a', '_single', '_entity', '_matched', '_which', '_is', '_the', '_same', '_as', '_the', '_entity', '_being', '_validated', '_the', '_entity', '_is', '_the', '_last', '_enabled', '_entity', '_available', '_.', '</s>']
278
+ 02/17/2024 15:23:02 - INFO - __main__ - nl_ids: 0 6 2 2815 1375 4498 5865 448 2616 14677 872 434 3501 4498 5865 1839 555 448 2641 880 448 4498 4251 20709 448 4498 555 448 2023 5334 4498 3777 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
279
+ 02/17/2024 15:25:32 - INFO - __main__ - *** Example ***
280
+ 02/17/2024 15:25:32 - INFO - __main__ - idx: 0
281
+ 02/17/2024 15:25:32 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'func', '_getAll', 'Dep', 'Types', '_(', '_)', '_[', '_]', 'string', '{', '_dep', 'Types', '_:=', '_make', '_(', '_[', '_]', 'string', ',', '_0', '_,', '_len', '_(', '_cmds', '_)', '_)', '_Ċ', '_for', '_dep', 'Type', '_:=', '_range', '_cmds', '_{', '_dep', 'Types', '_=', '_append', '_(', '_dep', 'Types', '_,', '_dep', 'Type', '_)', '_Ċ', '_}', '_Ċ', '_sort', '_.', '_Strings', '_(', '_dep', 'Types', '_)', '_Ċ', '_return', '_dep', 'Types', '_Ċ', '</s>']
282
+ 02/17/2024 15:25:32 - INFO - __main__ - code_ids: 0 6 2 763 21556 15010 2531 400 743 626 2406 571 209 13994 2531 716 2002 400 626 2406 571 130 461 2019 1015 400 22803 743 743 1022 563 13994 641 716 1780 22803 399 13994 2531 385 2746 400 13994 2531 2019 13994 641 743 1022 425 1022 4821 746 23012 400 13994 2531 743 1022 483 13994 2531 1022 2
283
+ 02/17/2024 15:25:32 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'getAll', 'Dep', 'Types', '_returns', '_a', '_sorted', '_list', '_of', 'name', 's', '_of', '_all', '_dep', '_type', '_commands', '_.', '</s>']
284
+ 02/17/2024 15:25:32 - INFO - __main__ - nl_ids: 0 6 2 12199 15010 2531 2060 434 6977 1182 595 616 201 595 1345 13994 889 7997 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
285
+ 02/17/2024 15:25:32 - INFO - __main__ - *** Example ***
286
+ 02/17/2024 15:25:32 - INFO - __main__ - idx: 1
287
+ 02/17/2024 15:25:32 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'func', '_get', 'Io', 'Progress', 'Reader', '_(', '_label', 'string', ',', '_res', '_*', '_http', '_.', '_Response', '_)', '_io', '_.', '_Reader', '_{', '_prefix', '_:=', '"', '"', '+', '_label', '_Ċ', '_fmt', 'Bytes', 'Size', '_:=', '_18', '_Ċ', '_bar', 'Size', '_:=', '_int', '64', '_(', '_80', '_-', '_len', '_(', '_prefix', '_)', '_-', '_fmt', 'Bytes', 'Size', '_)', '_Ċ', '_bar', '_:=', '_i', 'opro', 'gress', '_.', '_Draw', 'Text', 'Format', 'Bar', '</s>']
288
+ 02/17/2024 15:25:32 - INFO - __main__ - code_ids: 0 6 2 763 744 8499 4909 2692 400 2649 571 130 705 426 2014 746 6397 743 3095 746 15471 399 3603 716 120 120 129 2649 1022 2771 2240 939 716 7837 1022 5252 939 716 554 848 400 8967 581 1015 400 3603 743 581 2771 2240 939 743 1022 5252 716 548 31375 2639 746 8548 1072 1660 3238 2
289
+ 02/17/2024 15:25:32 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'get', 'Io', 'Progress', 'Reader', '_returns', '_a', '_reader', '_that', '_wraps', '_the', '_HTTP', '_response', '_body', '_so', '_it', '_prints', '_a', '_pretty', '_progress', '_bar', '_when', '_reading', '_data', '_from', '_it', '_.', '</s>']
290
+ 02/17/2024 15:25:32 - INFO - __main__ - nl_ids: 0 6 2 459 8499 4909 2692 2060 434 4636 922 28232 448 4383 1925 3444 1769 835 22199 434 15344 6687 5252 1672 8267 869 1029 835 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
291
+ 02/17/2024 15:25:32 - INFO - __main__ - *** Example ***
292
+ 02/17/2024 15:25:32 - INFO - __main__ - idx: 2
293
+ 02/17/2024 15:25:32 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'func', '_(', '_f', '_*', '_remove', 'OnClose', '_)', '_Close', '_(', '_)', '_error', '_{', '_if', '_f', '_==', '_nil', '_||', '_f', '_.', '_File', '_==', '_nil', '_{', '_return', '_nil', '_Ċ', '_}', 'name', ':', '=', '_f', '_.', '_File', '_.', '_Name', '_(', '_)', '_Ċ', '_if', '_err', '_:=', '_f', '_.', '_File', '_.', '_Close', '_(', '_)', '_;', '_err', '_!=', '_nil', '_{', '_return', '_err', '_Ċ', '_}', '_Ċ', '_if', '_err', '</s>']
294
+ 02/17/2024 15:25:32 - INFO - __main__ - code_ids: 0 6 2 763 400 412 426 3033 45359 743 5832 400 743 843 399 462 412 550 845 853 412 746 2536 550 845 399 483 845 1022 425 616 144 147 412 746 2536 746 3725 400 743 1022 462 573 716 412 746 2536 746 5832 400 743 2476 573 620 845 399 483 573 1022 425 1022 462 573 2
295
+ 02/17/2024 15:25:32 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Close', '_closes', '_the', '_file', '_and', '_then', '_removes', '_it', '_from', '_disk', '_.', '_No', '_error', '_is', '_returned', '_if', '_the', '_file', '_did', '_not', '_exist', '_at', '_the', '_point', '_of', '_removal', '_.', '</s>']
296
+ 02/17/2024 15:25:32 - INFO - __main__ - nl_ids: 0 6 2 3108 19735 448 1012 706 2270 15719 835 1029 8236 746 4038 843 555 2862 462 448 1012 6088 800 3040 1035 448 1704 595 23066 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
297
+ 02/17/2024 15:25:48 - INFO - __main__ - *** Example ***
298
+ 02/17/2024 15:25:48 - INFO - __main__ - idx: 0
299
+ 02/17/2024 15:25:48 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'def', '_render', '_', 'body', '_(', '_con', 'text', ',', '_options', '_)', '_if', '_options', '_.', '_key', '?', '_(', '_:', 'partial', '_)', '_[', '_render', '_', 'partial', '_(', '_con', 'text', ',', '_options', '_)', '_]', '_else', '_Streaming', 'Template', 'Renderer', '_.', '_new', '_(', '_@', 'lookup', '_', 'con', 'text', ')', '_.', '_render', '_(', '_con', 'text', ',', '_options', '_)', '_end', '_end', '</s>']
300
+ 02/17/2024 15:25:48 - INFO - __main__ - code_ids: 0 6 2 729 4342 181 1995 400 549 625 130 1466 743 462 1466 746 1129 149 400 545 7609 743 626 4342 181 7609 400 549 625 130 1466 743 2406 669 47128 3057 6412 746 579 400 890 4961 181 525 625 127 746 4342 400 549 625 130 1466 743 1013 1013 2 1 1 1 1 1 1 1
301
+ 02/17/2024 15:25:48 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Render', '_but', '_returns', '_a', '_valid', '_R', 'ack', '_body', '_.', '_If', '_fib', 'ers', '_are', '_defined', '_we', '_return', '_a', '_streaming', '_body', '_that', '_renders', '_the', '_template', '_piece', '_by', '_piece', '_.', '</s>']
302
+ 02/17/2024 15:25:48 - INFO - __main__ - nl_ids: 0 6 2 3726 2107 2060 434 1976 821 598 3444 746 1359 24766 560 1147 3474 937 483 434 22676 3444 922 40840 448 3636 18781 1243 18781 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
303
+ 02/17/2024 15:25:48 - INFO - __main__ - *** Example ***
304
+ 02/17/2024 15:25:48 - INFO - __main__ - idx: 1
305
+ 02/17/2024 15:25:48 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'def', '_attribute', '_', 'missing', '_(', '_match', '_,', '_*', '_args', '_,', '_&', '_block', '_)', '___', 'send', '__', '_(', '_match', '_.', '_target', '_,', '_match', '_.', '_attr', '_', 'name', ',', '_args', '_,', '_block', '_)', '_end', '</s>']
306
+ 02/17/2024 15:25:48 - INFO - __main__ - code_ids: 0 6 2 729 2416 181 8487 400 1655 2019 426 1822 2019 519 1818 743 1267 2414 876 400 1655 746 1744 2019 1655 746 3526 181 616 130 1822 2019 1818 743 1013 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
307
+ 02/17/2024 15:25:48 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', '+', '_attribute', '_', 'missing', '_+', '_is', '_like', '_+', '_method', '_', 'missing', '_+', '_but', '_for', '_attributes', '_.', '_When', '_+', '_method', '_', 'missing', '_+', '_is', '_called', '_we', '_check', '_to', '_see', '_if', '_there', '_is', '_a', '_matching', '_attribute', '_method', '_.', '_If', '_so', '_we', '_tell', '_+', '_attribute', '_', 'missing', '_+', '_to', '_dispatch', '_the', '_attribute', '_.', '_This', '_method', '_can', '_be', '_overloaded', '_to', '_customize', '_the', '_behavior', '_.', '</s>']
308
+ 02/17/2024 15:25:48 - INFO - __main__ - nl_ids: 0 6 2 129 2416 181 8487 513 555 4401 513 1454 181 8487 513 2107 563 4402 746 5919 513 1454 181 8487 513 555 2953 937 1382 508 3986 462 2550 555 434 6506 2416 1454 746 1359 1769 937 11931 513 2416 181 8487 513 508 9363 448 2416 746 1600 1454 1347 661 45869 508 36145 448 9050 746 2
309
+ 02/17/2024 15:25:48 - INFO - __main__ - *** Example ***
310
+ 02/17/2024 15:25:48 - INFO - __main__ - idx: 2
311
+ 02/17/2024 15:25:48 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'def', '_matched', '_', 'attribute', '_', 'method', '_(', '_method', '_', 'name', ')', '_matches', '_=', '_self', '_.', 'class', '.', '_send', '_(', '_:', 'attribute', '_', 'method', '_', 'matchers', '_', 'matching', '_,', '_method', '_', 'name', ')', '_matches', '_.', '_detect', '_{', '_|', '_match', '_|', '_attribute', '_', 'method', '?', '_(', '_match', '_.', '_attr', '_', 'name', ')', '_}', '_end', '</s>']
312
+ 02/17/2024 15:25:48 - INFO - __main__ - code_ids: 0 6 2 729 5865 181 2163 181 1521 400 1454 181 616 127 5288 385 1358 746 1149 132 2904 400 545 2163 181 1521 181 38734 181 13575 2019 1454 181 616 127 5288 746 10241 399 649 1655 649 2416 181 1521 149 400 1655 746 3526 181 616 127 425 1013 2 1 1 1 1 1 1 1 1
313
+ 02/17/2024 15:25:48 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Returns', '_a', '_struct', '_representing', '_the', '_matching', '_attribute', '_method', '_.', '_The', '_struct', '_s', '_attributes', '_are', '_prefix', '_base', '_and', '_suffix', '_.', '</s>']
314
+ 02/17/2024 15:25:48 - INFO - __main__ - nl_ids: 0 6 2 2853 434 1277 8466 448 6506 2416 1454 746 1044 1277 431 4402 1147 3603 1712 706 8436 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
315
+ 02/17/2024 15:25:48 - INFO - __main__ - ***** Running training *****
316
+ 02/17/2024 15:25:48 - INFO - __main__ - Num examples = 908224
317
+ 02/17/2024 15:25:48 - INFO - __main__ - Num Epochs = 10
318
+ 02/17/2024 15:25:48 - INFO - __main__ - Num quene = 1024
319
+ 02/17/2024 15:25:48 - INFO - __main__ - Instantaneous batch size per GPU = 64
320
+ 02/17/2024 15:25:48 - INFO - __main__ - Total train batch size = 128
321
+ Traceback (most recent call last):
322
+ File "run.py", line 1200, in <module>
323
+ main()
324
+ File "run.py", line 1160, in main
325
+ multi_lang_continue_pre_train(args, model, tokenizer, pool)
326
+ File "run.py", line 756, in multi_lang_continue_pre_train
327
+ nl_q=nl_inputs , nl_k=nl_transformations_ids )
328
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
329
+ return forward_call(*input, **kwargs)
330
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 168, in forward
331
+ outputs = self.parallel_apply(replicas, inputs, kwargs)
332
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 178, in parallel_apply
333
+ return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
334
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply
335
+ output.reraise()
336
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/_utils.py", line 434, in reraise
337
+ raise exception
338
+ UnboundLocalError: Caught UnboundLocalError in replica 0 on device 0.
339
+ Original Traceback (most recent call last):
340
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker
341
+ output = module(*input, **kwargs)
342
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
343
+ return forward_call(*input, **kwargs)
344
+ File "/home/yiming/cocosoda/CoCoSoDa/model.py", line 235, in forward
345
+ code_q = torch.nn.functional.normalize(code_q, p=2, dim=1)
346
+ UnboundLocalError: local variable 'code_q' referenced before assignment
347
+
saved_models/codesearch_contrastive_learning/Model/Epoch_1/base_dvi.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1396d58628aa89cf55b533e8c813f633582c8f2b77c210189bfcf355005fcc28
3
+ size 9506759
saved_models/codesearch_contrastive_learning/Model/Epoch_1/bgimg.png ADDED
saved_models/codesearch_contrastive_learning/Model/Epoch_1/embedding.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:085bb5f7efe704f484da4f7603c28b58486e62822fbd89e145a2084e3d86f437
3
+ size 199544
saved_models/codesearch_contrastive_learning/Model/Epoch_1/index.json ADDED
The diff for this file is too large to render. See raw diff
 
saved_models/codesearch_contrastive_learning/Model/Epoch_1/scale.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1e3a9ad91c1421ffc446780a7cd7227fca32e1d19cd04388819496d7cfea4d1
3
+ size 144
saved_models/codesearch_contrastive_learning/Model/Epoch_1/subject_model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e507b62594fe1d7cebbabf653d559acb9e9a72f9d31b57ea53721bb52e26d228
3
+ size 1524384769
saved_models/codesearch_contrastive_learning/Model/Epoch_1/test_data.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:206096f239b771e8d12a88ac196562ac6a760fd050bbd1abec8e3f8c42c9da8a
3
+ size 3873920
saved_models/codesearch_contrastive_learning/Model/Epoch_1/train_data.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f108ee34bab6336566ee678a151b507bc739f608d59c9c043a2ad60148ac6002
3
+ size 76575872
saved_models/codesearch_contrastive_learning/Model/Epoch_2/base_dvi.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4539a62bfb97589fc21289309bca1128a3b2e57310a5f041e9ee8f5a5c438eb0
3
+ size 9506759
saved_models/codesearch_contrastive_learning/Model/Epoch_2/bgimg.png ADDED
saved_models/codesearch_contrastive_learning/Model/Epoch_2/embedding.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3664112c7d7b3ec5263c4ae0400bf3cc9229c5337cf5ce7e11c63180a07c43e
3
+ size 199544
saved_models/codesearch_contrastive_learning/Model/Epoch_2/index.json ADDED
The diff for this file is too large to render. See raw diff
 
saved_models/codesearch_contrastive_learning/Model/Epoch_2/scale.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1341dfba85e04a8a7bbbc37f743f425a19dd6b2bc436329197fe93581fbe41c9
3
+ size 144
saved_models/codesearch_contrastive_learning/Model/Epoch_2/subject_model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e507b62594fe1d7cebbabf653d559acb9e9a72f9d31b57ea53721bb52e26d228
3
+ size 1524384769
saved_models/codesearch_contrastive_learning/Model/Epoch_2/test_data.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5b836191dbb4c7a6ed3e9a762a859a9bd3f4ec6eefc9f5fb31adcc2bea76d88
3
+ size 3873920
saved_models/codesearch_contrastive_learning/Model/Epoch_2/train_data.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15a96c83f0154fe93e57987c99b3ad060558e85bb33bcd347cf195c1280cd6bd
3
+ size 76575872
saved_models/codesearch_contrastive_learning/Model/__pycache__/model.cpython-37.pyc ADDED
Binary file (8.81 kB). View file
 
saved_models/codesearch_contrastive_learning/Model/__pycache__/model.cpython-38.pyc ADDED
Binary file (8.48 kB). View file
 
saved_models/codesearch_contrastive_learning/Model/model-cs.py ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import torch.nn as nn
3
+ from prettytable import PrettyTable
4
+ from torch.nn.modules.activation import Tanh
5
+ import copy
6
+ import logging
7
+ logger = logging.getLogger(__name__)
8
+ from transformers import (WEIGHTS_NAME, AdamW, get_linear_schedule_with_warmup,
9
+ RobertaConfig, RobertaModel, RobertaTokenizer)
10
+ def whitening_torch_final(embeddings):
11
+ mu = torch.mean(embeddings, dim=0, keepdim=True)
12
+ cov = torch.mm((embeddings - mu).t(), embeddings - mu)
13
+ u, s, vt = torch.svd(cov)
14
+ W = torch.mm(u, torch.diag(1/torch.sqrt(s)))
15
+ embeddings = torch.mm(embeddings - mu, W)
16
+ return embeddings
17
+
18
+ class BaseModel(nn.Module):
19
+ def __init__(self, ):
20
+ super().__init__()
21
+
22
+ def model_parameters(self):
23
+ table = PrettyTable()
24
+ table.field_names = ["Layer Name", "Output Shape", "Param #"]
25
+ table.align["Layer Name"] = "l"
26
+ table.align["Output Shape"] = "r"
27
+ table.align["Param #"] = "r"
28
+ for name, parameters in self.named_parameters():
29
+ if parameters.requires_grad:
30
+ table.add_row([name, str(list(parameters.shape)), parameters.numel()])
31
+ return table
32
+ class Model(BaseModel):
33
+ def __init__(self, encoder):
34
+ super(Model, self).__init__()
35
+ self.encoder = encoder
36
+
37
+ def forward(self, code_inputs=None, nl_inputs=None):
38
+ # code_inputs [bs, seq]
39
+ if code_inputs is not None:
40
+ outputs = self.encoder(code_inputs,attention_mask=code_inputs.ne(1))[0] #[bs, seq_len, dim]
41
+ outputs = (outputs*code_inputs.ne(1)[:,:,None]).sum(1)/code_inputs.ne(1).sum(-1)[:,None] # None作为ndarray或tensor的索引作用是增加维度,
42
+ return torch.nn.functional.normalize(outputs, p=2, dim=1)
43
+ else:
44
+ outputs = self.encoder(nl_inputs,attention_mask=nl_inputs.ne(1))[0]
45
+ outputs = (outputs*nl_inputs.ne(1)[:,:,None]).sum(1)/nl_inputs.ne(1).sum(-1)[:,None]
46
+ return torch.nn.functional.normalize(outputs, p=2, dim=1)
47
+
48
+
49
+ class Multi_Loss_CoCoSoDa( BaseModel):
50
+
51
+ def __init__(self, base_encoder, args, mlp=False):
52
+ super(Multi_Loss_CoCoSoDa, self).__init__()
53
+
54
+ self.K = args.moco_k
55
+ self.m = args.moco_m
56
+ self.T = args.moco_t
57
+ dim= args.moco_dim
58
+
59
+ # create the encoders
60
+ # num_classes is the output fc dimension
61
+ self.code_encoder_q = base_encoder
62
+ self.code_encoder_k = copy.deepcopy(base_encoder)
63
+ self.nl_encoder_q = base_encoder
64
+ # self.nl_encoder_q = RobertaModel.from_pretrained("roberta-base")
65
+ self.nl_encoder_k = copy.deepcopy(self.nl_encoder_q)
66
+ self.mlp = mlp
67
+ self.time_score= args.time_score
68
+ self.do_whitening = args.do_whitening
69
+ self.do_ineer_loss = args.do_ineer_loss
70
+ self.agg_way = args.agg_way
71
+ self.args = args
72
+
73
+ for param_q, param_k in zip(self.code_encoder_q.parameters(), self.code_encoder_k.parameters()):
74
+ param_k.data.copy_(param_q.data) # initialize
75
+ param_k.requires_grad = False # not update by gradient
76
+
77
+ for param_q, param_k in zip(self.nl_encoder_q.parameters(), self.nl_encoder_k.parameters()):
78
+ param_k.data.copy_(param_q.data) # initialize
79
+ param_k.requires_grad = False # not update by gradient
80
+
81
+ # create the code queue
82
+ torch.manual_seed(3047)
83
+ torch.cuda.manual_seed(3047)
84
+ self.register_buffer("code_queue", torch.randn(dim,self.K ))
85
+ self.code_queue = nn.functional.normalize(self.code_queue, dim=0)
86
+ self.register_buffer("code_queue_ptr", torch.zeros(1, dtype=torch.long))
87
+ # create the masked code queue
88
+ self.register_buffer("masked_code_queue", torch.randn(dim, self.K ))
89
+ self.masked_code_queue = nn.functional.normalize(self.masked_code_queue, dim=0)
90
+ self.register_buffer("masked_code_queue_ptr", torch.zeros(1, dtype=torch.long))
91
+
92
+
93
+ # create the nl queue
94
+ self.register_buffer("nl_queue", torch.randn(dim, self.K ))
95
+ self.nl_queue = nn.functional.normalize(self.nl_queue, dim=0)
96
+ self.register_buffer("nl_queue_ptr", torch.zeros(1, dtype=torch.long))
97
+ # create the masked nl queue
98
+ self.register_buffer("masked_nl_queue", torch.randn(dim, self.K ))
99
+ self.masked_nl_queue= nn.functional.normalize(self.masked_nl_queue, dim=0)
100
+ self.register_buffer("masked_nl_queue_ptr", torch.zeros(1, dtype=torch.long))
101
+
102
+
103
+
104
+
105
+ @torch.no_grad()
106
+ def _momentum_update_key_encoder(self):
107
+ """
108
+ Momentum update of the key encoder
109
+ % key encoder的Momentum update
110
+ """
111
+ for param_q, param_k in zip(self.code_encoder_q.parameters(), self.code_encoder_k.parameters()):
112
+ param_k.data = param_k.data * self.m + param_q.data * (1. - self.m)
113
+ for param_q, param_k in zip(self.nl_encoder_q.parameters(), self.nl_encoder_k.parameters()):
114
+ param_k.data = param_k.data * self.m + param_q.data * (1. - self.m)
115
+ if self.mlp:
116
+ for param_q, param_k in zip(self.code_encoder_q_fc.parameters(), self.code_encoder_k_fc.parameters()):
117
+ param_k.data = param_k.data * self.m + param_q.data * (1. - self.m)
118
+ for param_q, param_k in zip(self.nl_encoder_q_fc.parameters(), self.nl_encoder_k_fc.parameters()):
119
+ param_k.data = param_k.data * self.m + param_q.data * (1. - self.m)
120
+
121
+ @torch.no_grad()
122
+ def _dequeue_and_enqueue(self, keys, option='code'):
123
+ # gather keys before updating queue
124
+ # keys = concat_all_gather(keys)
125
+
126
+ batch_size = keys.shape[0]
127
+ if option == 'code':
128
+ code_ptr = int(self.code_queue_ptr)
129
+ assert self.K % batch_size == 0 # for simplicity
130
+
131
+ # replace the keys at ptr (dequeue and enqueue)
132
+ try:
133
+ self.code_queue[:, code_ptr:code_ptr + batch_size] = keys.T
134
+ except:
135
+ print(code_ptr)
136
+ print(batch_size)
137
+ print(keys.shape)
138
+ exit(111)
139
+ code_ptr = (code_ptr + batch_size) % self.K # move pointer ptr->pointer
140
+
141
+ self.code_queue_ptr[0] = code_ptr
142
+
143
+ elif option == 'masked_code':
144
+ masked_code_ptr = int(self.masked_code_queue_ptr)
145
+ assert self.K % batch_size == 0 # for simplicity
146
+
147
+ # replace the keys at ptr (dequeue and enqueue)
148
+ try:
149
+ self.masked_code_queue[:, masked_code_ptr:masked_code_ptr + batch_size] = keys.T
150
+ except:
151
+ print(masked_code_ptr)
152
+ print(batch_size)
153
+ print(keys.shape)
154
+ exit(111)
155
+ masked_code_ptr = (masked_code_ptr + batch_size) % self.K # move pointer ptr->pointer
156
+
157
+ self.masked_code_queue_ptr[0] = masked_code_ptr
158
+
159
+ elif option == 'nl':
160
+
161
+ nl_ptr = int(self.nl_queue_ptr)
162
+ assert self.K % batch_size == 0 # for simplicity
163
+
164
+ # replace the keys at ptr (dequeue and enqueue)
165
+ self.nl_queue[:, nl_ptr:nl_ptr + batch_size] = keys.T
166
+ nl_ptr = (nl_ptr + batch_size) % self.K # move pointer ptr->pointer
167
+
168
+ self.nl_queue_ptr[0] = nl_ptr
169
+ elif option == 'masked_nl':
170
+
171
+ masked_nl_ptr = int(self.masked_nl_queue_ptr)
172
+ assert self.K % batch_size == 0 # for simplicity
173
+
174
+ # replace the keys at ptr (dequeue and enqueue)
175
+ self.masked_nl_queue[:, masked_nl_ptr:masked_nl_ptr + batch_size] = keys.T
176
+ masked_nl_ptr = (masked_nl_ptr + batch_size) % self.K # move pointer ptr->pointer
177
+
178
+ self.masked_nl_queue_ptr[0] = masked_nl_ptr
179
+
180
+
181
+
182
+ def forward(self, source_code_q, source_code_k, nl_q,nl_k):
183
+ """
184
+ Input:
185
+ im_q: a batch of query images
186
+ im_k: a batch of key images
187
+ Output:
188
+ logits, targets
189
+ """
190
+ if not self.args.do_multi_lang_continue_pre_train:
191
+ # logger.info(".do_multi_lang_continue_pre_train")
192
+ outputs = self.code_encoder_q(source_code_q, attention_mask=source_code_q.ne(1))[0]
193
+ code_q = (outputs*source_code_q.ne(1)[:,:,None]).sum(1)/source_code_q.ne(1).sum(-1)[:,None] # None作为ndarray或tensor的索引作用是增加维度,
194
+ code_q = torch.nn.functional.normalize(code_q, p=2, dim=1)
195
+ # compute query features for nl
196
+ outputs= self.nl_encoder_q(nl_q, attention_mask=nl_q.ne(1))[0] # queries: NxC bs*feature_dim
197
+ nl_q = (outputs*nl_q.ne(1)[:,:,None]).sum(1)/nl_q.ne(1).sum(-1)[:,None]
198
+ nl_q = torch.nn.functional.normalize(nl_q, p=2, dim=1)
199
+ code2nl_logits = torch.einsum("ab,cb->ac", code_q,nl_q )
200
+ # loss = self.loss_fct(scores*20, torch.arange(code_inputs.size(0), device=scores.device))
201
+ code2nl_logits /= self.T
202
+ # label
203
+ code2nl_label = torch.arange(code2nl_logits.size(0), device=code2nl_logits.device)
204
+ return code2nl_logits,code2nl_label, None, None
205
+ if self.agg_way == "avg":
206
+ # compute query features for source code
207
+ outputs = self.code_encoder_q(source_code_q, attention_mask=source_code_q.ne(1))[0]
208
+ code_q = (outputs*source_code_q.ne(1)[:,:,None]).sum(1)/source_code_q.ne(1).sum(-1)[:,None] # None作为ndarray或tensor的索引作用是增加维度,
209
+ code_q = torch.nn.functional.normalize(code_q, p=2, dim=1)
210
+ # compute query features for nl
211
+ outputs= self.nl_encoder_q(nl_q, attention_mask=nl_q.ne(1))[0] # queries: NxC bs*feature_dim
212
+ nl_q = (outputs*nl_q.ne(1)[:,:,None]).sum(1)/nl_q.ne(1).sum(-1)[:,None]
213
+ nl_q = torch.nn.functional.normalize(nl_q, p=2, dim=1)
214
+
215
+ # compute key features
216
+ with torch.no_grad(): # no gradient to keys
217
+ self._momentum_update_key_encoder() # update the key encoder
218
+
219
+ # shuffle for making use of BN
220
+ # im_k, idx_unshuffle = self._batch_shuffle_ddp(im_k)
221
+
222
+ # masked code
223
+ outputs = self.code_encoder_k(source_code_k, attention_mask=source_code_k.ne(1))[0] # keys: NxC
224
+ code_k = (outputs*source_code_k.ne(1)[:,:,None]).sum(1)/source_code_k.ne(1).sum(-1)[:,None] # None作为ndarray或tensor的索引作用是增加维度,
225
+ code_k = torch.nn.functional.normalize( code_k, p=2, dim=1)
226
+ # masked nl
227
+ outputs = self.nl_encoder_k(nl_k, attention_mask=nl_k.ne(1))[0] # keys: bs*dim
228
+ nl_k = (outputs*nl_k.ne(1)[:,:,None]).sum(1)/nl_k.ne(1).sum(-1)[:,None]
229
+ nl_k = torch.nn.functional.normalize(nl_k, p=2, dim=1)
230
+
231
+ elif self.agg_way == "cls_pooler":
232
+ # logger.info(self.agg_way )
233
+ # compute query features for source code
234
+ outputs = self.code_encoder_q(source_code_q, attention_mask=source_code_q.ne(1))[1]
235
+ code_q = torch.nn.functional.normalize(code_q, p=2, dim=1)
236
+ # compute query features for nl
237
+ outputs= self.nl_encoder_q(nl_q, attention_mask=nl_q.ne(1))[1] # queries: NxC bs*feature_dim
238
+ nl_q = torch.nn.functional.normalize(nl_q, p=2, dim=1)
239
+
240
+ # compute key features
241
+ with torch.no_grad(): # no gradient to keys
242
+ self._momentum_update_key_encoder() # update the key encoder
243
+
244
+ # shuffle for making use of BN
245
+ # im_k, idx_unshuffle = self._batch_shuffle_ddp(im_k)
246
+
247
+ # masked code
248
+ outputs = self.code_encoder_k(source_code_k, attention_mask=source_code_k.ne(1))[1] # keys: NxC
249
+ code_k = torch.nn.functional.normalize( code_k, p=2, dim=1)
250
+ # masked nl
251
+ outputs = self.nl_encoder_k(nl_k, attention_mask=nl_k.ne(1))[1] # keys: bs*dim
252
+ nl_k = torch.nn.functional.normalize(nl_k, p=2, dim=1)
253
+
254
+ elif self.agg_way == "avg_cls_pooler":
255
+ # logger.info(self.agg_way )
256
+ outputs = self.code_encoder_q(source_code_q, attention_mask=source_code_q.ne(1))
257
+ code_q_cls = outputs[1]
258
+ outputs = outputs[0]
259
+ code_q_avg = (outputs*source_code_q.ne(1)[:,:,None]).sum(1)/source_code_q.ne(1).sum(-1)[:,None] # None作为ndarray或tensor的索引作用是增加维度,
260
+ code_q = code_q_cls + code_q_avg
261
+ code_q = torch.nn.functional.normalize(code_q, p=2, dim=1)
262
+ # compute query features for nl
263
+ outputs= self.nl_encoder_q(nl_q, attention_mask=nl_q.ne(1))
264
+ nl_q_cls = outputs[1]
265
+ outputs= outputs[0] # queries: NxC bs*feature_dim
266
+ nl_q_avg = (outputs*nl_q.ne(1)[:,:,None]).sum(1)/nl_q.ne(1).sum(-1)[:,None]
267
+ nl_q = nl_q_avg + nl_q_cls
268
+ nl_q = torch.nn.functional.normalize(nl_q, p=2, dim=1)
269
+
270
+ # compute key features
271
+ with torch.no_grad(): # no gradient to keys
272
+ self._momentum_update_key_encoder() # update the key encoder
273
+
274
+ # shuffle for making use of BN
275
+ # im_k, idx_unshuffle = self._batch_shuffle_ddp(im_k)
276
+
277
+ # masked code
278
+
279
+ outputs = self.code_encoder_k(source_code_k, attention_mask=source_code_k.ne(1))
280
+ code_k_cls = outputs[1] # keys: NxC
281
+ outputs = outputs[0]
282
+ code_k_avg = (outputs*source_code_k.ne(1)[:,:,None]).sum(1)/source_code_k.ne(1).sum(-1)[:,None] # None作为ndarray或tensor的索引作用是增加维度,
283
+ code_k = code_k_cls + code_k_avg
284
+ code_k = torch.nn.functional.normalize( code_k, p=2, dim=1)
285
+ # masked nl
286
+ outputs = self.nl_encoder_k(nl_k, attention_mask=nl_k.ne(1))
287
+ nl_k_cls = outputs[1] # keys: bs*dim
288
+ outputs = outputs[0]
289
+ nl_k_avg = (outputs*nl_k.ne(1)[:,:,None]).sum(1)/nl_k.ne(1).sum(-1)[:,None]
290
+ nl_k = nl_k_cls + nl_k_avg
291
+ nl_k = torch.nn.functional.normalize(nl_k, p=2, dim=1)
292
+
293
+ # ## do_whitening
294
+ # if self.do_whitening:
295
+ # code_q = whitening_torch_final(code_q)
296
+ # code_k = whitening_torch_final(code_k)
297
+ # nl_q = whitening_torch_final(nl_q)
298
+ # nl_k = whitening_torch_final(nl_k)
299
+
300
+
301
+ ## code vs nl
302
+ code2nl_pos = torch.einsum('nc,bc->nb', [code_q, nl_q])
303
+ # negative logits: NxK
304
+ code2nl_neg = torch.einsum('nc,ck->nk', [code_q, self.nl_queue.clone().detach()])
305
+ # logits: Nx(n+K)
306
+ code2nl_logits = torch.cat([self.time_score*code2nl_pos, code2nl_neg], dim=1)
307
+ # apply temperature
308
+ code2nl_logits /= self.T
309
+ # label
310
+ code2nl_label = torch.arange(code2nl_logits.size(0), device=code2nl_logits.device)
311
+
312
+ ## code vs masked nl
313
+ code2maskednl_pos = torch.einsum('nc,bc->nb', [code_q, nl_k])
314
+ # negative logits: NxK
315
+ code2maskednl_neg = torch.einsum('nc,ck->nk', [code_q, self.masked_nl_queue.clone().detach()])
316
+ # logits: Nx(n+K)
317
+ code2maskednl_logits = torch.cat([self.time_score*code2maskednl_pos, code2maskednl_neg], dim=1)
318
+ # apply temperature
319
+ code2maskednl_logits /= self.T
320
+ # label
321
+ code2maskednl_label = torch.arange(code2maskednl_logits.size(0), device=code2maskednl_logits.device)
322
+
323
+ ## nl vs code
324
+ # nl2code_pos = torch.einsum('nc,nc->n', [nl_q, code_k]).unsqueeze(-1)
325
+ nl2code_pos = torch.einsum('nc,bc->nb', [nl_q, code_q])
326
+ # negative logits: bsxK
327
+ nl2code_neg = torch.einsum('nc,ck->nk', [nl_q, self.code_queue.clone().detach()])
328
+ # nl2code_logits: bsx(n+K)
329
+ nl2code_logits = torch.cat([self.time_score*nl2code_pos, nl2code_neg], dim=1)
330
+ # apply temperature
331
+ nl2code_logits /= self.T
332
+ # label
333
+ nl2code_label = torch.arange(nl2code_logits.size(0), device=nl2code_logits.device)
334
+
335
+ ## nl vs masked code
336
+ # nl2code_pos = torch.einsum('nc,nc->n', [nl_q, code_k]).unsqueeze(-1)
337
+ nl2maskedcode_pos = torch.einsum('nc,bc->nb', [nl_q, code_k])
338
+ # negative logits: bsxK
339
+ nl2maskedcode_neg = torch.einsum('nc,ck->nk', [nl_q, self.masked_code_queue.clone().detach()])
340
+ # nl2code_logits: bsx(n+K)
341
+ nl2maskedcode_logits = torch.cat([self.time_score*nl2maskedcode_pos, nl2maskedcode_neg], dim=1)
342
+ # apply temperature
343
+ nl2maskedcode_logits /= self.T
344
+ # label
345
+ nl2maskedcode_label = torch.arange(nl2maskedcode_logits.size(0), device=nl2maskedcode_logits.device)
346
+
347
+ #logit 4*bsx(1+K)
348
+ inter_logits = torch.cat((code2nl_logits, code2maskednl_logits, nl2code_logits ,nl2maskedcode_logits ), dim=0)
349
+
350
+ # labels: positive key indicators
351
+ # inter_labels = torch.zeros(inter_logits.shape[0], dtype=torch.long).cuda()
352
+ inter_labels = torch.cat((code2nl_label, code2maskednl_label, nl2code_label, nl2maskedcode_label), dim=0)
353
+
354
+ if self.do_ineer_loss:
355
+ # logger.info("do_ineer_loss")
356
+ ## code vs masked code
357
+ code2maskedcode_pos = torch.einsum('nc,bc->nb', [code_q, code_k])
358
+ # negative logits: NxK
359
+ code2maskedcode_neg = torch.einsum('nc,ck->nk', [code_q, self.masked_code_queue.clone().detach()])
360
+ # logits: Nx(n+K)
361
+ code2maskedcode_logits = torch.cat([self.time_score*code2maskedcode_pos, code2maskedcode_neg], dim=1)
362
+ # apply temperature
363
+ code2maskedcode_logits /= self.T
364
+ # label
365
+ code2maskedcode_label = torch.arange(code2maskedcode_logits.size(0), device=code2maskedcode_logits.device)
366
+
367
+
368
+ ## nl vs masked nl
369
+ # nl2code_pos = torch.einsum('nc,nc->n', [nl_q, code_k]).unsqueeze(-1)
370
+ nl2maskednl_pos = torch.einsum('nc,bc->nb', [nl_q, nl_k])
371
+ # negative logits: bsxK
372
+ nl2maskednl_neg = torch.einsum('nc,ck->nk', [nl_q, self.masked_nl_queue.clone().detach()])
373
+ # nl2code_logits: bsx(n+K)
374
+ nl2maskednl_logits = torch.cat([self.time_score*nl2maskednl_pos, nl2maskednl_neg], dim=1)
375
+ # apply temperature
376
+ nl2maskednl_logits /= self.T
377
+ # label
378
+ nl2maskednl_label = torch.arange(nl2maskednl_logits.size(0), device=nl2maskednl_logits.device)
379
+
380
+
381
+ #logit 6*bsx(1+K)
382
+ inter_logits = torch.cat((inter_logits, code2maskedcode_logits, nl2maskednl_logits), dim=0)
383
+
384
+ # labels: positive key indicators
385
+ # inter_labels = torch.zeros(inter_logits.shape[0], dtype=torch.long).cuda()
386
+ inter_labels = torch.cat(( inter_labels, code2maskedcode_label, nl2maskednl_label ), dim=0)
387
+
388
+
389
+ # dequeue and enqueue
390
+ self._dequeue_and_enqueue(code_q, option='code')
391
+ self._dequeue_and_enqueue(nl_q, option='nl')
392
+ self._dequeue_and_enqueue(code_k, option='masked_code')
393
+ self._dequeue_and_enqueue(nl_k, option='masked_nl')
394
+
395
+ return inter_logits, inter_labels, code_q, nl_q
396
+
saved_models/codesearch_contrastive_learning/Model/model.py ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import torch.nn as nn
3
+ import os
4
+
5
+
6
+ __all__ = [
7
+ "ResNet",
8
+ "resnet18_with_dropout",
9
+ "resnet18",
10
+ "dropout_resnet18"
11
+ ]
12
+
13
+
14
+ def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):
15
+ """3x3 convolution with padding"""
16
+ return nn.Conv2d(
17
+ in_planes,
18
+ out_planes,
19
+ kernel_size=3,
20
+ stride=stride,
21
+ padding=dilation,
22
+ groups=groups,
23
+ bias=False,
24
+ dilation=dilation,
25
+ )
26
+
27
+
28
+ def conv1x1(in_planes, out_planes, stride=1):
29
+ """1x1 convolution"""
30
+ return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False)
31
+
32
+ class BasicBlock(nn.Module):
33
+ expansion = 1
34
+
35
+ def __init__(
36
+ self,
37
+ inplanes,
38
+ planes,
39
+ stride=1,
40
+ downsample=None,
41
+ groups=1,
42
+ base_width=64,
43
+ dilation=1,
44
+ norm_layer=None,
45
+ ):
46
+ super(BasicBlock, self).__init__()
47
+ if norm_layer is None:
48
+ norm_layer = nn.BatchNorm2d
49
+ if groups != 1 or base_width != 64:
50
+ raise ValueError("BasicBlock only supports groups=1 and base_width=64")
51
+ if dilation > 1:
52
+ raise NotImplementedError("Dilation > 1 not supported in BasicBlock")
53
+ # Both self.conv1 and self.downsample layers downsample the input when stride != 1
54
+ self.conv1 = conv3x3(inplanes, planes, stride)
55
+ self.bn1 = norm_layer(planes)
56
+ self.relu = nn.ReLU(inplace=True)
57
+ self.conv2 = conv3x3(planes, planes)
58
+ self.bn2 = norm_layer(planes)
59
+ self.downsample = downsample
60
+ self.stride = stride
61
+
62
+
63
+ def forward(self, x):
64
+ identity = x
65
+
66
+ out = self.conv1(x)
67
+ out = self.bn1(out)
68
+ out = self.relu(out)
69
+
70
+ out = self.conv2(out)
71
+ out = self.bn2(out)
72
+
73
+ if self.downsample is not None:
74
+ identity = self.downsample(x)
75
+
76
+ out += identity
77
+ out = self.relu(out)
78
+
79
+ return out
80
+
81
+ class BasicBlock_withDropout(nn.Module):
82
+ expansion = 1
83
+
84
+ def __init__(
85
+ self,
86
+ inplanes,
87
+ planes,
88
+ stride=1,
89
+ downsample=None,
90
+ groups=1,
91
+ base_width=64,
92
+ dilation=1,
93
+ norm_layer=None,
94
+ ):
95
+ super(BasicBlock_withDropout, self).__init__()
96
+ if norm_layer is None:
97
+ norm_layer = nn.BatchNorm2d
98
+ if groups != 1 or base_width != 64:
99
+ raise ValueError("BasicBlock only supports groups=1 and base_width=64")
100
+ if dilation > 1:
101
+ raise NotImplementedError("Dilation > 1 not supported in BasicBlock")
102
+ # Both self.conv1 and self.downsample layers downsample the input when stride != 1
103
+ self.dropout = nn.Dropout(p=0.5)
104
+ self.conv1 = conv3x3(inplanes, planes, stride)
105
+ self.bn1 = norm_layer(planes)
106
+ self.relu = nn.ReLU(inplace=True)
107
+ self.conv2 = conv3x3(planes, planes)
108
+ self.bn2 = norm_layer(planes)
109
+ self.downsample = downsample
110
+ self.stride = stride
111
+ # print('with_dropout',self.with_dropout)
112
+
113
+ def forward(self, x):
114
+ identity = x
115
+
116
+ out = self.conv1(x)
117
+ out = self.bn1(out)
118
+ out = self.relu(out)
119
+
120
+
121
+ out = self.conv2(out)
122
+ out = self.bn2(out)
123
+
124
+ if self.downsample is not None:
125
+ identity = self.downsample(x)
126
+
127
+ out += identity
128
+ out = self.relu(out)
129
+
130
+ return out
131
+
132
+
133
+ class Bottleneck(nn.Module):
134
+ expansion = 4
135
+
136
+ def __init__(
137
+ self,
138
+ inplanes,
139
+ planes,
140
+ stride=1,
141
+ downsample=None,
142
+ groups=1,
143
+ base_width=64,
144
+ dilation=1,
145
+ norm_layer=None,
146
+ ):
147
+ super(Bottleneck, self).__init__()
148
+ if norm_layer is None:
149
+ norm_layer = nn.BatchNorm2d
150
+ width = int(planes * (base_width / 64.0)) * groups
151
+ # Both self.conv2 and self.downsample layers downsample the input when stride != 1
152
+ self.conv1 = conv1x1(inplanes, width)
153
+ self.bn1 = norm_layer(width)
154
+ self.conv2 = conv3x3(width, width, stride, groups, dilation)
155
+ self.bn2 = norm_layer(width)
156
+ self.conv3 = conv1x1(width, planes * self.expansion)
157
+ self.bn3 = norm_layer(planes * self.expansion)
158
+ self.relu = nn.ReLU(inplace=True)
159
+ self.downsample = downsample
160
+ self.stride = stride
161
+
162
+ def forward(self, x):
163
+ identity = x
164
+
165
+ out = self.conv1(x)
166
+ out = self.bn1(out)
167
+ out = self.relu(out)
168
+
169
+ out = self.conv2(out)
170
+ out = self.bn2(out)
171
+ out = self.relu(out)
172
+
173
+ out = self.conv3(out)
174
+ out = self.bn3(out)
175
+
176
+ if self.downsample is not None:
177
+ identity = self.downsample(x)
178
+
179
+ out += identity
180
+ out = self.relu(out)
181
+
182
+ return out
183
+
184
+
185
+ class ResNet(nn.Module):
186
+ def __init__(
187
+ self,
188
+ block,
189
+ layers,
190
+ with_dropout,
191
+ num_classes=10,
192
+ zero_init_residual=False,
193
+ groups=1,
194
+ width_per_group=64,
195
+ replace_stride_with_dilation=None,
196
+ norm_layer=None,
197
+
198
+ ):
199
+ super(ResNet, self).__init__()
200
+ if norm_layer is None:
201
+ norm_layer = nn.BatchNorm2d
202
+ self._norm_layer = norm_layer
203
+
204
+ self.inplanes = 64
205
+ self.dilation = 1
206
+ if replace_stride_with_dilation is None:
207
+ # each element in the tuple indicates if we should replace
208
+ # the 2x2 stride with a dilated convolution instead
209
+ replace_stride_with_dilation = [False, False, False]
210
+ if len(replace_stride_with_dilation) != 3:
211
+ raise ValueError(
212
+ "replace_stride_with_dilation should be None "
213
+ "or a 3-element tuple, got {}".format(replace_stride_with_dilation)
214
+ )
215
+
216
+ self.with_dropout = with_dropout
217
+ self.groups = groups
218
+ self.base_width = width_per_group
219
+
220
+ # CIFAR10: kernel_size 7 -> 3, stride 2 -> 1, padding 3->1
221
+ self.conv1 = nn.Conv2d(
222
+ 3, self.inplanes, kernel_size=3, stride=1, padding=1, bias=False
223
+ )
224
+ # END
225
+
226
+ self.bn1 = norm_layer(self.inplanes)
227
+ self.relu = nn.ReLU(inplace=True)
228
+
229
+ self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1)
230
+ self.layer1 = self._make_layer(block, 64, layers[0])
231
+ self.layer2 = self._make_layer(
232
+ block, 128, layers[1], stride=2, dilate=replace_stride_with_dilation[0]
233
+ )
234
+ self.layer3 = self._make_layer(
235
+ block, 256, layers[2], stride=2, dilate=replace_stride_with_dilation[1]
236
+ )
237
+ self.layer4 = self._make_layer(
238
+ block, 512, layers[3], stride=2, dilate=replace_stride_with_dilation[2]
239
+ )
240
+ self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
241
+ self.fc = nn.Linear(512 * block.expansion, num_classes)
242
+
243
+ if self.with_dropout:
244
+ self.fc = nn.Sequential(nn.Flatten(),nn.Dropout(0.5),nn.Linear(512 * block.expansion, num_classes))
245
+
246
+
247
+
248
+ for m in self.modules():
249
+ if isinstance(m, nn.Conv2d):
250
+ nn.init.kaiming_normal_(m.weight, mode="fan_out", nonlinearity="relu")
251
+ elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)):
252
+ nn.init.constant_(m.weight, 1)
253
+ nn.init.constant_(m.bias, 0)
254
+
255
+ # Zero-initialize the last BN in each residual branch,
256
+ # so that the residual branch starts with zeros, and each residual block behaves like an identity.
257
+ # This improves the model by 0.2~0.3% according to https://arxiv.org/abs/1706.02677
258
+ if zero_init_residual:
259
+ for m in self.modules():
260
+ if isinstance(m, Bottleneck):
261
+ nn.init.constant_(m.bn3.weight, 0)
262
+ elif isinstance(m, BasicBlock):
263
+ nn.init.constant_(m.bn2.weight, 0)
264
+
265
+ def _make_layer(self, block, planes, blocks, stride=1, dilate=False):
266
+ norm_layer = self._norm_layer
267
+ downsample = None
268
+ previous_dilation = self.dilation
269
+ if dilate:
270
+ self.dilation *= stride
271
+ stride = 1
272
+ if stride != 1 or self.inplanes != planes * block.expansion:
273
+ downsample = nn.Sequential(
274
+ conv1x1(self.inplanes, planes * block.expansion, stride),
275
+ norm_layer(planes * block.expansion),
276
+ )
277
+
278
+ layers = []
279
+ layers.append(
280
+ block(
281
+ self.inplanes,
282
+ planes,
283
+ stride,
284
+ downsample,
285
+ self.groups,
286
+ self.base_width,
287
+ previous_dilation,
288
+ norm_layer,
289
+ )
290
+ )
291
+ self.inplanes = planes * block.expansion
292
+ for _ in range(1, blocks):
293
+ layers.append(
294
+ block(
295
+ self.inplanes,
296
+ planes,
297
+ groups=self.groups,
298
+ base_width=self.base_width,
299
+ dilation=self.dilation,
300
+ norm_layer=norm_layer,
301
+ )
302
+ )
303
+
304
+ return nn.Sequential(*layers)
305
+
306
+ def forward(self, x):
307
+ x = self.conv1(x)
308
+ x = self.bn1(x)
309
+ x = self.relu(x)
310
+ x = self.maxpool(x)
311
+
312
+ x = self.layer1(x)
313
+
314
+ x = self.layer2(x)
315
+
316
+ x = self.layer3(x)
317
+
318
+ x = self.layer4(x)
319
+
320
+ x = self.avgpool(x)
321
+ x = x.reshape(x.size(0), -1)
322
+ x = self.fc(x)
323
+
324
+ return x
325
+
326
+ def feature(self, x):
327
+ x = self.conv1(x)
328
+ x = self.bn1(x)
329
+ x = self.relu(x)
330
+ x = self.maxpool(x)
331
+
332
+ x = self.layer1(x)
333
+ x = self.layer2(x)
334
+ x = self.layer3(x)
335
+ x = self.layer4(x)
336
+
337
+ x = self.avgpool(x)
338
+ x = x.reshape(x.size(0), -1)
339
+ return x
340
+ def prediction(self,x):
341
+ x = self.fc(x)
342
+
343
+ return x
344
+
345
+ # def gap(self, x):
346
+ # x = self.conv1(x)
347
+ # x = self.bn1(x)
348
+ # x = self.relu(x)
349
+ # x = self.maxpool(x)
350
+
351
+ # x = self.layer1(x)
352
+ # x = self.layer2(x)
353
+ # x = self.layer3(x)
354
+ # x = self.layer4(x)
355
+
356
+ # x = self.avgpool(x)
357
+ # x = x.reshape(x.size(0), -1)
358
+ # return x
359
+
360
+
361
+ def _resnet(arch, block, layers, pretrained, progress, device, with_dropout, **kwargs):
362
+ model = ResNet(block, layers, with_dropout, **kwargs)
363
+ if pretrained:
364
+ script_dir = os.path.dirname(__file__)
365
+ state_dict = torch.load(
366
+ script_dir + "/state_dicts/" + arch + ".pt", map_location=device
367
+ )
368
+ model.load_state_dict(state_dict)
369
+ return model
370
+
371
+
372
+ def resnet18_with_dropout(pretrained=False, progress=True, device="cpu", **kwargs):
373
+ """Constructs a ResNet-18 model.
374
+ Args:
375
+ pretrained (bool): If True, returns a model pre-trained on ImageNet
376
+ progress (bool): If True, displays a progress bar of the download to stderr
377
+ """
378
+ return _resnet(
379
+ "resnet18", BasicBlock_withDropout, [2, 2, 2, 2], pretrained, progress, device, with_dropout = True, **kwargs
380
+ )
381
+
382
+ def resnet18(pretrained=False, progress=True, device="cpu", **kwargs):
383
+ """Constructs a ResNet-18 model.
384
+ Args:
385
+ pretrained (bool): If True, returns a model pre-trained on ImageNet
386
+ progress (bool): If True, displays a progress bar of the download to stderr
387
+ """
388
+ return _resnet(
389
+ "resnet18", BasicBlock, [2, 2, 2, 2], pretrained, progress, device, with_dropout = False, **kwargs
390
+ )
391
+
392
+
393
+ def resnet34(pretrained=False, progress=True, device="cpu", **kwargs):
394
+ """Constructs a ResNet-34 model.
395
+ Args:
396
+ pretrained (bool): If True, returns a model pre-trained on ImageNet
397
+ progress (bool): If True, displays a progress bar of the download to stderr
398
+ """
399
+ return _resnet(
400
+ "resnet34", BasicBlock, [3, 4, 6, 3], pretrained, progress, device, **kwargs
401
+ )
402
+
403
+
404
+ def resnet50(pretrained=False, progress=True, device="cpu", **kwargs):
405
+ """Constructs a ResNet-50 model.
406
+ Args:
407
+ pretrained (bool): If True, returns a model pre-trained on ImageNet
408
+ progress (bool): If True, displays a progress bar of the download to stderr
409
+ """
410
+ return _resnet(
411
+ "resnet50", Bottleneck, [3, 4, 6, 3], pretrained, progress, device, **kwargs
412
+ )
413
+
414
+ # class dropout_residual(nn.Module):
415
+ # def __init__(self, input_channels, num_channels, dropout_rate, dropout_type, init_dict, use_1x1conv=False, strides=1, **kwargs):
416
+ # super().__init__(**kwargs)
417
+ # self.conv1 = Dropout_Conv2D(input_channels, num_channels, kernel_size=3, padding=1, stride=strides, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict)
418
+ # self.conv2 = Dropout_Conv2D(num_channels, num_channels, kernel_size=3, padding=1, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict)
419
+
420
+ # if use_1x1conv:
421
+ # self.conv3 = Dropout_Conv2D(input_channels, num_channels, kernel_size=1, stride=strides, dropout_rate=dropout_rate, dropout_type=dropout_type)
422
+ # else:
423
+ # self.conv3 = None
424
+
425
+ # self.bn1 = nn.BatchNorm2d(num_channels)
426
+ # self.bn2 = nn.BatchNorm2d(num_channels)
427
+
428
+ # def dropout_resnet_block(input_channels, num_channels, num_residuals, dropout_rate, dropout_type, init_dict, first_block=False):
429
+ # blk = []
430
+ # for i in range(num_residuals):
431
+ # if i == 0 and not first_block:
432
+ # blk.append(dropout_residual(input_channels, num_channels, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict, use_1x1conv=True, strides=2))
433
+ # else:
434
+ # blk.append(dropout_residual(num_channels, num_channels, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict))
435
+ # return blk
436
+
437
+ # def dropout_resnet18(dropout_rate=0.5, dropout_type="w", init_dict=dict()):
438
+ # b1 = nn.Sequential(
439
+ # Dropout_Conv2D(1, 64, kernel_size=7, stride=2, padding=3, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict),
440
+ # nn.BatchNorm2d(64),
441
+ # nn.ReLU(),
442
+ # nn.MaxPool2d(kernel_size=3, stride=2, padding=1)
443
+ # )
444
+ # b2 = nn.Sequential(*dropout_resnet_block(64, 64, 2, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict, first_block=True))
445
+ # b3 = nn.Sequential(*dropout_resnet_block(64, 128, 2, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict))
446
+ # b4 = nn.Sequential(*dropout_resnet_block(128, 256, 2, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict))
447
+ # b5 = nn.Sequential(*dropout_resnet_block(256, 512, 2, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict))
448
+
449
+ # return nn.Sequential(b1, b2, b3, b4, b5,
450
+ # nn.AdaptiveAvgPool2d((1,1)),
451
+ # nn.Flatten(),
452
+ # Dropout_Linear(512, 20, dropout_rate=dropout_rate, dropout_type=dropout_type, init_dict=init_dict))
453
+
saved_models/codesearch_contrastive_learning/Model/time_base_dvi.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"complex_construction": {"1": 11.107, "2": 11.239}, "training": {"1": 210.918, "2": 216.733}}
saved_models/codesearch_contrastive_learning/Testing_data/testing_dataset_label.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4d5db38fa60eca28dbc4c1b14f5833385f954d95f46536e3c30212004bb1f73
3
+ size 2955
saved_models/codesearch_contrastive_learning/Training_data/training_dataset_label.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8821e7f4b0cec0c3d59d148845a4bd1e0f4f0be576e3da2d1bc97fb74a663eea
3
+ size 50445
saved_models/codesearch_contrastive_learning/config.json ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "SETTING": "normal",
3
+ "CLASSES": ["plane", "car", "bird", "cat", "deer", "dog", "frog", "horse", "ship", "truck"],
4
+ "DATASET": "cifar10",
5
+ "EPOCH_START": 1,
6
+ "EPOCH_END": 200,
7
+ "EPOCH_PERIOD": 1,
8
+ "GPU":0,
9
+ "TRAINING": {
10
+ "NET": "resnet18",
11
+ "loader_tr_args": {"batch_size": 128, "num_workers": 1},
12
+ "loader_te_args": {"batch_size": 1000, "num_workers": 1},
13
+ "optimizer_args": {"lr": 0.1, "momentum": 0.9, "weight_decay": 5e-4},
14
+ "num_class": 10,
15
+ "train_num": 50000,
16
+ "test_num": 10000,
17
+ "milestone":[160]
18
+ },
19
+ "VISUALIZATION":{
20
+
21
+ "S_LAMBDA":1,
22
+ "PREPROCESS":0,
23
+ "BOUNDARY":{
24
+ "B_N_EPOCHS": 0,
25
+ "L_BOUND":0.6
26
+ },
27
+ "INIT_NUM":300,
28
+
29
+ "ALPHA":0,
30
+ "BETA":0.1,
31
+ "MAX_HAUSDORFF":0.4,
32
+
33
+ "LAMBDA": 10.0,
34
+ "HIDDEN_LAYER":4,
35
+ "ENCODER_DIMS": [512,256,256,256,256,2],
36
+ "DECODER_DIMS": [2,256,256,256,256,512],
37
+ "N_NEIGHBORS":15,
38
+ "MAX_EPOCH": 20,
39
+ "S_N_EPOCHS": 5,
40
+ "T_N_EPOCHS": 100,
41
+ "PATIENT": 3,
42
+ "RESOLUTION":300,
43
+ "VIS_MODEL_NAME": "vis",
44
+ "EVALUATION_NAME": "evalution"
45
+ },
46
+ "DVI": {
47
+ "SETTING": "normal",
48
+ "CLASSES": ["0"],
49
+ "DATASET": "cifar10",
50
+ "GPU": "0",
51
+ "EPOCH_START": 1,
52
+ "EPOCH_END": 2,
53
+ "EPOCH_PERIOD": 1,
54
+ "EPOCH_NAME":"Epoch",
55
+ "TRAINING": {
56
+ "NET": "resnet18",
57
+ "loader_tr_args": {
58
+ "batch_size": 128,
59
+ "num_workers": 1
60
+ },
61
+ "loader_te_args": {
62
+ "batch_size": 1000,
63
+ "num_workers": 1
64
+ },
65
+ "optimizer_args": {
66
+ "lr": 0.1,
67
+ "momentum": 0.9,
68
+ "weight_decay": 0.0005
69
+ },
70
+ "num_class": 1,
71
+ "train_num": 24927,
72
+ "test_num": 1261,
73
+ "milestone": [
74
+ 10
75
+ ]
76
+ },
77
+ "VISUALIZATION": {
78
+ "PREPROCESS": 1,
79
+ "BOUNDARY": {
80
+ "B_N_EPOCHS": 0,
81
+ "L_BOUND": 0.4
82
+ },
83
+ "BATCH_SIZE":1000,
84
+ "LAMBDA1": 5.0,
85
+ "LAMBDA2": 0.3,
86
+
87
+ "ENCODER_DIMS_O": [128,64,64,64,64,2],
88
+ "DECODER_DIMS_O": [2,64,64,64,64,128],
89
+ "ENCODER_DIMS": [768,256,256,256,256,2],
90
+ "DECODER_DIMS": [2,256,256,256,256,768],
91
+ "N_NEIGHBORS": 15,
92
+ "MAX_EPOCH": 20,
93
+ "S_N_EPOCHS": 10,
94
+ "PATIENT": 3,
95
+ "RESOLUTION": 300,
96
+ "VIS_MODEL_NAME": "dvi",
97
+ "FLAG": "_temporal_id_withoutB",
98
+ "EVALUATION_NAME": "evaluation_tfDVI"
99
+ }
100
+ }
101
+ }
saved_models/codesearch_contrastive_learning/config_dvi_modi.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "SETTING": "normal",
3
+ "CLASSES": [
4
+ "0"
5
+ ],
6
+ "GPU": "0",
7
+ "DATASET": "cifar10",
8
+ "EPOCH_START": 1,
9
+ "EPOCH_END": 1,
10
+ "EPOCH_PERIOD": 1,
11
+ "TRAINING": {
12
+ "NET": "resnet18",
13
+ "num_class": 1,
14
+ "train_num": 24927,
15
+ "test_num": 1261
16
+ },
17
+ "VISUALIZATION": {
18
+ "PREPROCESS": 1,
19
+ "BOUNDARY": {
20
+ "B_N_EPOCHS": 0,
21
+ "L_BOUND": 0.5
22
+ },
23
+ "INIT_NUM": 300,
24
+ "ALPHA": 1,
25
+ "BETA": 1,
26
+ "MAX_HAUSDORFF": 0.33,
27
+ "LAMBDA1": 1,
28
+ "LAMBDA2": 0.3,
29
+ "S_LAMBDA": 1,
30
+ "ENCODER_DIMS": [
31
+ 768,
32
+ 256,
33
+ 256,
34
+ 256,
35
+ 256,
36
+ 2
37
+ ],
38
+ "DECODER_DIMS": [
39
+ 2,
40
+ 256,
41
+ 256,
42
+ 256,
43
+ 256,
44
+ 768
45
+ ],
46
+ "N_NEIGHBORS": 15,
47
+ "MAX_EPOCH": 200,
48
+ "S_N_EPOCHS": 5,
49
+ "T_N_EPOCHS": 20,
50
+ "PATIENT": 3,
51
+ "RESOLUTION": 300,
52
+ "VIS_MODEL_NAME": "dvi",
53
+ "EVALUATION_NAME": "test_evaluation_dvi"
54
+ }
55
+ }
saved_models/codesearch_contrastive_learning/iteration_structure.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "value": 1,
4
+ "name": "code",
5
+ "pid": ""
6
+ },
7
+ {
8
+ "value": 2,
9
+ "name": "query",
10
+ "pid": 1
11
+ }
12
+ ]
saved_models/fine_tune/Ruby/running.log ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 02/17/2024 13:45:08 - INFO - __main__ - device: cuda, n_gpu: 1
2
+ 02/17/2024 13:45:12 - INFO - __main__ - +------------------------------------------------------------+--------------+----------+
3
+ | Layer Name | Output Shape | Param # |
4
+ +------------------------------------------------------------+--------------+----------+
5
+ | encoder.embeddings.word_embeddings.weight | [51451, 768] | 39514368 |
6
+ | encoder.embeddings.position_embeddings.weight | [1026, 768] | 787968 |
7
+ | encoder.embeddings.token_type_embeddings.weight | [10, 768] | 7680 |
8
+ | encoder.embeddings.LayerNorm.weight | [768] | 768 |
9
+ | encoder.embeddings.LayerNorm.bias | [768] | 768 |
10
+ | encoder.encoder.layer.0.attention.self.query.weight | [768, 768] | 589824 |
11
+ | encoder.encoder.layer.0.attention.self.query.bias | [768] | 768 |
12
+ | encoder.encoder.layer.0.attention.self.key.weight | [768, 768] | 589824 |
13
+ | encoder.encoder.layer.0.attention.self.key.bias | [768] | 768 |
14
+ | encoder.encoder.layer.0.attention.self.value.weight | [768, 768] | 589824 |
15
+ | encoder.encoder.layer.0.attention.self.value.bias | [768] | 768 |
16
+ | encoder.encoder.layer.0.attention.output.dense.weight | [768, 768] | 589824 |
17
+ | encoder.encoder.layer.0.attention.output.dense.bias | [768] | 768 |
18
+ | encoder.encoder.layer.0.attention.output.LayerNorm.weight | [768] | 768 |
19
+ | encoder.encoder.layer.0.attention.output.LayerNorm.bias | [768] | 768 |
20
+ | encoder.encoder.layer.0.intermediate.dense.weight | [3072, 768] | 2359296 |
21
+ | encoder.encoder.layer.0.intermediate.dense.bias | [3072] | 3072 |
22
+ | encoder.encoder.layer.0.output.dense.weight | [768, 3072] | 2359296 |
23
+ | encoder.encoder.layer.0.output.dense.bias | [768] | 768 |
24
+ | encoder.encoder.layer.0.output.LayerNorm.weight | [768] | 768 |
25
+ | encoder.encoder.layer.0.output.LayerNorm.bias | [768] | 768 |
26
+ | encoder.encoder.layer.1.attention.self.query.weight | [768, 768] | 589824 |
27
+ | encoder.encoder.layer.1.attention.self.query.bias | [768] | 768 |
28
+ | encoder.encoder.layer.1.attention.self.key.weight | [768, 768] | 589824 |
29
+ | encoder.encoder.layer.1.attention.self.key.bias | [768] | 768 |
30
+ | encoder.encoder.layer.1.attention.self.value.weight | [768, 768] | 589824 |
31
+ | encoder.encoder.layer.1.attention.self.value.bias | [768] | 768 |
32
+ | encoder.encoder.layer.1.attention.output.dense.weight | [768, 768] | 589824 |
33
+ | encoder.encoder.layer.1.attention.output.dense.bias | [768] | 768 |
34
+ | encoder.encoder.layer.1.attention.output.LayerNorm.weight | [768] | 768 |
35
+ | encoder.encoder.layer.1.attention.output.LayerNorm.bias | [768] | 768 |
36
+ | encoder.encoder.layer.1.intermediate.dense.weight | [3072, 768] | 2359296 |
37
+ | encoder.encoder.layer.1.intermediate.dense.bias | [3072] | 3072 |
38
+ | encoder.encoder.layer.1.output.dense.weight | [768, 3072] | 2359296 |
39
+ | encoder.encoder.layer.1.output.dense.bias | [768] | 768 |
40
+ | encoder.encoder.layer.1.output.LayerNorm.weight | [768] | 768 |
41
+ | encoder.encoder.layer.1.output.LayerNorm.bias | [768] | 768 |
42
+ | encoder.encoder.layer.2.attention.self.query.weight | [768, 768] | 589824 |
43
+ | encoder.encoder.layer.2.attention.self.query.bias | [768] | 768 |
44
+ | encoder.encoder.layer.2.attention.self.key.weight | [768, 768] | 589824 |
45
+ | encoder.encoder.layer.2.attention.self.key.bias | [768] | 768 |
46
+ | encoder.encoder.layer.2.attention.self.value.weight | [768, 768] | 589824 |
47
+ | encoder.encoder.layer.2.attention.self.value.bias | [768] | 768 |
48
+ | encoder.encoder.layer.2.attention.output.dense.weight | [768, 768] | 589824 |
49
+ | encoder.encoder.layer.2.attention.output.dense.bias | [768] | 768 |
50
+ | encoder.encoder.layer.2.attention.output.LayerNorm.weight | [768] | 768 |
51
+ | encoder.encoder.layer.2.attention.output.LayerNorm.bias | [768] | 768 |
52
+ | encoder.encoder.layer.2.intermediate.dense.weight | [3072, 768] | 2359296 |
53
+ | encoder.encoder.layer.2.intermediate.dense.bias | [3072] | 3072 |
54
+ | encoder.encoder.layer.2.output.dense.weight | [768, 3072] | 2359296 |
55
+ | encoder.encoder.layer.2.output.dense.bias | [768] | 768 |
56
+ | encoder.encoder.layer.2.output.LayerNorm.weight | [768] | 768 |
57
+ | encoder.encoder.layer.2.output.LayerNorm.bias | [768] | 768 |
58
+ | encoder.encoder.layer.3.attention.self.query.weight | [768, 768] | 589824 |
59
+ | encoder.encoder.layer.3.attention.self.query.bias | [768] | 768 |
60
+ | encoder.encoder.layer.3.attention.self.key.weight | [768, 768] | 589824 |
61
+ | encoder.encoder.layer.3.attention.self.key.bias | [768] | 768 |
62
+ | encoder.encoder.layer.3.attention.self.value.weight | [768, 768] | 589824 |
63
+ | encoder.encoder.layer.3.attention.self.value.bias | [768] | 768 |
64
+ | encoder.encoder.layer.3.attention.output.dense.weight | [768, 768] | 589824 |
65
+ | encoder.encoder.layer.3.attention.output.dense.bias | [768] | 768 |
66
+ | encoder.encoder.layer.3.attention.output.LayerNorm.weight | [768] | 768 |
67
+ | encoder.encoder.layer.3.attention.output.LayerNorm.bias | [768] | 768 |
68
+ | encoder.encoder.layer.3.intermediate.dense.weight | [3072, 768] | 2359296 |
69
+ | encoder.encoder.layer.3.intermediate.dense.bias | [3072] | 3072 |
70
+ | encoder.encoder.layer.3.output.dense.weight | [768, 3072] | 2359296 |
71
+ | encoder.encoder.layer.3.output.dense.bias | [768] | 768 |
72
+ | encoder.encoder.layer.3.output.LayerNorm.weight | [768] | 768 |
73
+ | encoder.encoder.layer.3.output.LayerNorm.bias | [768] | 768 |
74
+ | encoder.encoder.layer.4.attention.self.query.weight | [768, 768] | 589824 |
75
+ | encoder.encoder.layer.4.attention.self.query.bias | [768] | 768 |
76
+ | encoder.encoder.layer.4.attention.self.key.weight | [768, 768] | 589824 |
77
+ | encoder.encoder.layer.4.attention.self.key.bias | [768] | 768 |
78
+ | encoder.encoder.layer.4.attention.self.value.weight | [768, 768] | 589824 |
79
+ | encoder.encoder.layer.4.attention.self.value.bias | [768] | 768 |
80
+ | encoder.encoder.layer.4.attention.output.dense.weight | [768, 768] | 589824 |
81
+ | encoder.encoder.layer.4.attention.output.dense.bias | [768] | 768 |
82
+ | encoder.encoder.layer.4.attention.output.LayerNorm.weight | [768] | 768 |
83
+ | encoder.encoder.layer.4.attention.output.LayerNorm.bias | [768] | 768 |
84
+ | encoder.encoder.layer.4.intermediate.dense.weight | [3072, 768] | 2359296 |
85
+ | encoder.encoder.layer.4.intermediate.dense.bias | [3072] | 3072 |
86
+ | encoder.encoder.layer.4.output.dense.weight | [768, 3072] | 2359296 |
87
+ | encoder.encoder.layer.4.output.dense.bias | [768] | 768 |
88
+ | encoder.encoder.layer.4.output.LayerNorm.weight | [768] | 768 |
89
+ | encoder.encoder.layer.4.output.LayerNorm.bias | [768] | 768 |
90
+ | encoder.encoder.layer.5.attention.self.query.weight | [768, 768] | 589824 |
91
+ | encoder.encoder.layer.5.attention.self.query.bias | [768] | 768 |
92
+ | encoder.encoder.layer.5.attention.self.key.weight | [768, 768] | 589824 |
93
+ | encoder.encoder.layer.5.attention.self.key.bias | [768] | 768 |
94
+ | encoder.encoder.layer.5.attention.self.value.weight | [768, 768] | 589824 |
95
+ | encoder.encoder.layer.5.attention.self.value.bias | [768] | 768 |
96
+ | encoder.encoder.layer.5.attention.output.dense.weight | [768, 768] | 589824 |
97
+ | encoder.encoder.layer.5.attention.output.dense.bias | [768] | 768 |
98
+ | encoder.encoder.layer.5.attention.output.LayerNorm.weight | [768] | 768 |
99
+ | encoder.encoder.layer.5.attention.output.LayerNorm.bias | [768] | 768 |
100
+ | encoder.encoder.layer.5.intermediate.dense.weight | [3072, 768] | 2359296 |
101
+ | encoder.encoder.layer.5.intermediate.dense.bias | [3072] | 3072 |
102
+ | encoder.encoder.layer.5.output.dense.weight | [768, 3072] | 2359296 |
103
+ | encoder.encoder.layer.5.output.dense.bias | [768] | 768 |
104
+ | encoder.encoder.layer.5.output.LayerNorm.weight | [768] | 768 |
105
+ | encoder.encoder.layer.5.output.LayerNorm.bias | [768] | 768 |
106
+ | encoder.encoder.layer.6.attention.self.query.weight | [768, 768] | 589824 |
107
+ | encoder.encoder.layer.6.attention.self.query.bias | [768] | 768 |
108
+ | encoder.encoder.layer.6.attention.self.key.weight | [768, 768] | 589824 |
109
+ | encoder.encoder.layer.6.attention.self.key.bias | [768] | 768 |
110
+ | encoder.encoder.layer.6.attention.self.value.weight | [768, 768] | 589824 |
111
+ | encoder.encoder.layer.6.attention.self.value.bias | [768] | 768 |
112
+ | encoder.encoder.layer.6.attention.output.dense.weight | [768, 768] | 589824 |
113
+ | encoder.encoder.layer.6.attention.output.dense.bias | [768] | 768 |
114
+ | encoder.encoder.layer.6.attention.output.LayerNorm.weight | [768] | 768 |
115
+ | encoder.encoder.layer.6.attention.output.LayerNorm.bias | [768] | 768 |
116
+ | encoder.encoder.layer.6.intermediate.dense.weight | [3072, 768] | 2359296 |
117
+ | encoder.encoder.layer.6.intermediate.dense.bias | [3072] | 3072 |
118
+ | encoder.encoder.layer.6.output.dense.weight | [768, 3072] | 2359296 |
119
+ | encoder.encoder.layer.6.output.dense.bias | [768] | 768 |
120
+ | encoder.encoder.layer.6.output.LayerNorm.weight | [768] | 768 |
121
+ | encoder.encoder.layer.6.output.LayerNorm.bias | [768] | 768 |
122
+ | encoder.encoder.layer.7.attention.self.query.weight | [768, 768] | 589824 |
123
+ | encoder.encoder.layer.7.attention.self.query.bias | [768] | 768 |
124
+ | encoder.encoder.layer.7.attention.self.key.weight | [768, 768] | 589824 |
125
+ | encoder.encoder.layer.7.attention.self.key.bias | [768] | 768 |
126
+ | encoder.encoder.layer.7.attention.self.value.weight | [768, 768] | 589824 |
127
+ | encoder.encoder.layer.7.attention.self.value.bias | [768] | 768 |
128
+ | encoder.encoder.layer.7.attention.output.dense.weight | [768, 768] | 589824 |
129
+ | encoder.encoder.layer.7.attention.output.dense.bias | [768] | 768 |
130
+ | encoder.encoder.layer.7.attention.output.LayerNorm.weight | [768] | 768 |
131
+ | encoder.encoder.layer.7.attention.output.LayerNorm.bias | [768] | 768 |
132
+ | encoder.encoder.layer.7.intermediate.dense.weight | [3072, 768] | 2359296 |
133
+ | encoder.encoder.layer.7.intermediate.dense.bias | [3072] | 3072 |
134
+ | encoder.encoder.layer.7.output.dense.weight | [768, 3072] | 2359296 |
135
+ | encoder.encoder.layer.7.output.dense.bias | [768] | 768 |
136
+ | encoder.encoder.layer.7.output.LayerNorm.weight | [768] | 768 |
137
+ | encoder.encoder.layer.7.output.LayerNorm.bias | [768] | 768 |
138
+ | encoder.encoder.layer.8.attention.self.query.weight | [768, 768] | 589824 |
139
+ | encoder.encoder.layer.8.attention.self.query.bias | [768] | 768 |
140
+ | encoder.encoder.layer.8.attention.self.key.weight | [768, 768] | 589824 |
141
+ | encoder.encoder.layer.8.attention.self.key.bias | [768] | 768 |
142
+ | encoder.encoder.layer.8.attention.self.value.weight | [768, 768] | 589824 |
143
+ | encoder.encoder.layer.8.attention.self.value.bias | [768] | 768 |
144
+ | encoder.encoder.layer.8.attention.output.dense.weight | [768, 768] | 589824 |
145
+ | encoder.encoder.layer.8.attention.output.dense.bias | [768] | 768 |
146
+ | encoder.encoder.layer.8.attention.output.LayerNorm.weight | [768] | 768 |
147
+ | encoder.encoder.layer.8.attention.output.LayerNorm.bias | [768] | 768 |
148
+ | encoder.encoder.layer.8.intermediate.dense.weight | [3072, 768] | 2359296 |
149
+ | encoder.encoder.layer.8.intermediate.dense.bias | [3072] | 3072 |
150
+ | encoder.encoder.layer.8.output.dense.weight | [768, 3072] | 2359296 |
151
+ | encoder.encoder.layer.8.output.dense.bias | [768] | 768 |
152
+ | encoder.encoder.layer.8.output.LayerNorm.weight | [768] | 768 |
153
+ | encoder.encoder.layer.8.output.LayerNorm.bias | [768] | 768 |
154
+ | encoder.encoder.layer.9.attention.self.query.weight | [768, 768] | 589824 |
155
+ | encoder.encoder.layer.9.attention.self.query.bias | [768] | 768 |
156
+ | encoder.encoder.layer.9.attention.self.key.weight | [768, 768] | 589824 |
157
+ | encoder.encoder.layer.9.attention.self.key.bias | [768] | 768 |
158
+ | encoder.encoder.layer.9.attention.self.value.weight | [768, 768] | 589824 |
159
+ | encoder.encoder.layer.9.attention.self.value.bias | [768] | 768 |
160
+ | encoder.encoder.layer.9.attention.output.dense.weight | [768, 768] | 589824 |
161
+ | encoder.encoder.layer.9.attention.output.dense.bias | [768] | 768 |
162
+ | encoder.encoder.layer.9.attention.output.LayerNorm.weight | [768] | 768 |
163
+ | encoder.encoder.layer.9.attention.output.LayerNorm.bias | [768] | 768 |
164
+ | encoder.encoder.layer.9.intermediate.dense.weight | [3072, 768] | 2359296 |
165
+ | encoder.encoder.layer.9.intermediate.dense.bias | [3072] | 3072 |
166
+ | encoder.encoder.layer.9.output.dense.weight | [768, 3072] | 2359296 |
167
+ | encoder.encoder.layer.9.output.dense.bias | [768] | 768 |
168
+ | encoder.encoder.layer.9.output.LayerNorm.weight | [768] | 768 |
169
+ | encoder.encoder.layer.9.output.LayerNorm.bias | [768] | 768 |
170
+ | encoder.encoder.layer.10.attention.self.query.weight | [768, 768] | 589824 |
171
+ | encoder.encoder.layer.10.attention.self.query.bias | [768] | 768 |
172
+ | encoder.encoder.layer.10.attention.self.key.weight | [768, 768] | 589824 |
173
+ | encoder.encoder.layer.10.attention.self.key.bias | [768] | 768 |
174
+ | encoder.encoder.layer.10.attention.self.value.weight | [768, 768] | 589824 |
175
+ | encoder.encoder.layer.10.attention.self.value.bias | [768] | 768 |
176
+ | encoder.encoder.layer.10.attention.output.dense.weight | [768, 768] | 589824 |
177
+ | encoder.encoder.layer.10.attention.output.dense.bias | [768] | 768 |
178
+ | encoder.encoder.layer.10.attention.output.LayerNorm.weight | [768] | 768 |
179
+ | encoder.encoder.layer.10.attention.output.LayerNorm.bias | [768] | 768 |
180
+ | encoder.encoder.layer.10.intermediate.dense.weight | [3072, 768] | 2359296 |
181
+ | encoder.encoder.layer.10.intermediate.dense.bias | [3072] | 3072 |
182
+ | encoder.encoder.layer.10.output.dense.weight | [768, 3072] | 2359296 |
183
+ | encoder.encoder.layer.10.output.dense.bias | [768] | 768 |
184
+ | encoder.encoder.layer.10.output.LayerNorm.weight | [768] | 768 |
185
+ | encoder.encoder.layer.10.output.LayerNorm.bias | [768] | 768 |
186
+ | encoder.encoder.layer.11.attention.self.query.weight | [768, 768] | 589824 |
187
+ | encoder.encoder.layer.11.attention.self.query.bias | [768] | 768 |
188
+ | encoder.encoder.layer.11.attention.self.key.weight | [768, 768] | 589824 |
189
+ | encoder.encoder.layer.11.attention.self.key.bias | [768] | 768 |
190
+ | encoder.encoder.layer.11.attention.self.value.weight | [768, 768] | 589824 |
191
+ | encoder.encoder.layer.11.attention.self.value.bias | [768] | 768 |
192
+ | encoder.encoder.layer.11.attention.output.dense.weight | [768, 768] | 589824 |
193
+ | encoder.encoder.layer.11.attention.output.dense.bias | [768] | 768 |
194
+ | encoder.encoder.layer.11.attention.output.LayerNorm.weight | [768] | 768 |
195
+ | encoder.encoder.layer.11.attention.output.LayerNorm.bias | [768] | 768 |
196
+ | encoder.encoder.layer.11.intermediate.dense.weight | [3072, 768] | 2359296 |
197
+ | encoder.encoder.layer.11.intermediate.dense.bias | [3072] | 3072 |
198
+ | encoder.encoder.layer.11.output.dense.weight | [768, 3072] | 2359296 |
199
+ | encoder.encoder.layer.11.output.dense.bias | [768] | 768 |
200
+ | encoder.encoder.layer.11.output.LayerNorm.weight | [768] | 768 |
201
+ | encoder.encoder.layer.11.output.LayerNorm.bias | [768] | 768 |
202
+ | encoder.pooler.dense.weight | [768, 768] | 589824 |
203
+ | encoder.pooler.dense.bias | [768] | 768 |
204
+ +------------------------------------------------------------+--------------+----------+
205
+ 02/17/2024 13:45:12 - INFO - __main__ - Training/evaluation parameters Namespace(agg_way='avg', aug_type_way='random_replace_type', code_length=256, codebase_file='dataset/Ruby/codebase.jsonl', config_name='DeepSoftwareAnalytics/CoCoSoDa', couninue_pre_train_data_files=['dataset/ruby/train.jsonl', 'dataset/java/train.jsonl'], data_aug_type='random_mask', data_flow_length=0, debug=False, device=device(type='cuda'), do_avg=False, do_continue_pre_trained=False, do_eval=False, do_fine_tune=False, do_ineer_loss=False, do_multi_lang_continue_pre_train=False, do_single_lang_continue_pre_train=False, do_test=True, do_train=True, do_whitening=False, do_zero_short=False, epoch=50, eval_batch_size=64, eval_data_file='dataset/Ruby/valid.jsonl', eval_frequency=100, fp16=False, gradient_accumulation_steps=1, hidden_size=768, lang='Ruby', learning_rate=2e-05, loaded_codebert_model_filename=None, loaded_model_filename=None, local_rank=-1, logging_steps=50, max_codeblock_num=10, max_grad_norm=1.0, max_steps=100, mlm_probability=0.1, mlp=False, moco_dim=768, moco_k=1024, moco_m=0.999, moco_t=0.07, moco_type='encoder_queue', model_name_or_path='DeepSoftwareAnalytics/CoCoSoDa', model_type='base', n_debug_samples=100, n_gpu=1, nl_length=128, num_train_epochs=5, num_warmup_steps=0, only_save_the_nl_code_vec=False, output_dir='./saved_models/fine_tune/Ruby', print_align_unif_loss=False, save_evaluation_reuslt=False, save_evaluation_reuslt_dir=None, save_steps=50, seed=123456, test_data_file='dataset/Ruby/test.jsonl', time_score=1, tokenizer_name='DeepSoftwareAnalytics/CoCoSoDa', train_batch_size=128, train_data_file='dataset/Ruby/train.jsonl', use_best_mrr_model=False, weight_decay=0.01)
206
+ Traceback (most recent call last):
207
+ File "run.py", line 1188, in <module>
208
+ main()
209
+ File "run.py", line 1154, in main
210
+ train(args, model, tokenizer, pool)
211
+ File "run.py", line 534, in train
212
+ train_dataset=TextDataset_unixcoder(tokenizer, args, args.train_data_file, pool)
213
+ File "run.py", line 393, in __init__
214
+ with open(file_path) as f:
215
+ FileNotFoundError: [Errno 2] No such file or directory: 'dataset/Ruby/train.jsonl'
saved_models/fine_tune/java/running.log ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 02/17/2024 13:45:37 - INFO - __main__ - device: cuda, n_gpu: 1
2
+ 02/17/2024 13:45:41 - INFO - __main__ - +------------------------------------------------------------+--------------+----------+
3
+ | Layer Name | Output Shape | Param # |
4
+ +------------------------------------------------------------+--------------+----------+
5
+ | encoder.embeddings.word_embeddings.weight | [51451, 768] | 39514368 |
6
+ | encoder.embeddings.position_embeddings.weight | [1026, 768] | 787968 |
7
+ | encoder.embeddings.token_type_embeddings.weight | [10, 768] | 7680 |
8
+ | encoder.embeddings.LayerNorm.weight | [768] | 768 |
9
+ | encoder.embeddings.LayerNorm.bias | [768] | 768 |
10
+ | encoder.encoder.layer.0.attention.self.query.weight | [768, 768] | 589824 |
11
+ | encoder.encoder.layer.0.attention.self.query.bias | [768] | 768 |
12
+ | encoder.encoder.layer.0.attention.self.key.weight | [768, 768] | 589824 |
13
+ | encoder.encoder.layer.0.attention.self.key.bias | [768] | 768 |
14
+ | encoder.encoder.layer.0.attention.self.value.weight | [768, 768] | 589824 |
15
+ | encoder.encoder.layer.0.attention.self.value.bias | [768] | 768 |
16
+ | encoder.encoder.layer.0.attention.output.dense.weight | [768, 768] | 589824 |
17
+ | encoder.encoder.layer.0.attention.output.dense.bias | [768] | 768 |
18
+ | encoder.encoder.layer.0.attention.output.LayerNorm.weight | [768] | 768 |
19
+ | encoder.encoder.layer.0.attention.output.LayerNorm.bias | [768] | 768 |
20
+ | encoder.encoder.layer.0.intermediate.dense.weight | [3072, 768] | 2359296 |
21
+ | encoder.encoder.layer.0.intermediate.dense.bias | [3072] | 3072 |
22
+ | encoder.encoder.layer.0.output.dense.weight | [768, 3072] | 2359296 |
23
+ | encoder.encoder.layer.0.output.dense.bias | [768] | 768 |
24
+ | encoder.encoder.layer.0.output.LayerNorm.weight | [768] | 768 |
25
+ | encoder.encoder.layer.0.output.LayerNorm.bias | [768] | 768 |
26
+ | encoder.encoder.layer.1.attention.self.query.weight | [768, 768] | 589824 |
27
+ | encoder.encoder.layer.1.attention.self.query.bias | [768] | 768 |
28
+ | encoder.encoder.layer.1.attention.self.key.weight | [768, 768] | 589824 |
29
+ | encoder.encoder.layer.1.attention.self.key.bias | [768] | 768 |
30
+ | encoder.encoder.layer.1.attention.self.value.weight | [768, 768] | 589824 |
31
+ | encoder.encoder.layer.1.attention.self.value.bias | [768] | 768 |
32
+ | encoder.encoder.layer.1.attention.output.dense.weight | [768, 768] | 589824 |
33
+ | encoder.encoder.layer.1.attention.output.dense.bias | [768] | 768 |
34
+ | encoder.encoder.layer.1.attention.output.LayerNorm.weight | [768] | 768 |
35
+ | encoder.encoder.layer.1.attention.output.LayerNorm.bias | [768] | 768 |
36
+ | encoder.encoder.layer.1.intermediate.dense.weight | [3072, 768] | 2359296 |
37
+ | encoder.encoder.layer.1.intermediate.dense.bias | [3072] | 3072 |
38
+ | encoder.encoder.layer.1.output.dense.weight | [768, 3072] | 2359296 |
39
+ | encoder.encoder.layer.1.output.dense.bias | [768] | 768 |
40
+ | encoder.encoder.layer.1.output.LayerNorm.weight | [768] | 768 |
41
+ | encoder.encoder.layer.1.output.LayerNorm.bias | [768] | 768 |
42
+ | encoder.encoder.layer.2.attention.self.query.weight | [768, 768] | 589824 |
43
+ | encoder.encoder.layer.2.attention.self.query.bias | [768] | 768 |
44
+ | encoder.encoder.layer.2.attention.self.key.weight | [768, 768] | 589824 |
45
+ | encoder.encoder.layer.2.attention.self.key.bias | [768] | 768 |
46
+ | encoder.encoder.layer.2.attention.self.value.weight | [768, 768] | 589824 |
47
+ | encoder.encoder.layer.2.attention.self.value.bias | [768] | 768 |
48
+ | encoder.encoder.layer.2.attention.output.dense.weight | [768, 768] | 589824 |
49
+ | encoder.encoder.layer.2.attention.output.dense.bias | [768] | 768 |
50
+ | encoder.encoder.layer.2.attention.output.LayerNorm.weight | [768] | 768 |
51
+ | encoder.encoder.layer.2.attention.output.LayerNorm.bias | [768] | 768 |
52
+ | encoder.encoder.layer.2.intermediate.dense.weight | [3072, 768] | 2359296 |
53
+ | encoder.encoder.layer.2.intermediate.dense.bias | [3072] | 3072 |
54
+ | encoder.encoder.layer.2.output.dense.weight | [768, 3072] | 2359296 |
55
+ | encoder.encoder.layer.2.output.dense.bias | [768] | 768 |
56
+ | encoder.encoder.layer.2.output.LayerNorm.weight | [768] | 768 |
57
+ | encoder.encoder.layer.2.output.LayerNorm.bias | [768] | 768 |
58
+ | encoder.encoder.layer.3.attention.self.query.weight | [768, 768] | 589824 |
59
+ | encoder.encoder.layer.3.attention.self.query.bias | [768] | 768 |
60
+ | encoder.encoder.layer.3.attention.self.key.weight | [768, 768] | 589824 |
61
+ | encoder.encoder.layer.3.attention.self.key.bias | [768] | 768 |
62
+ | encoder.encoder.layer.3.attention.self.value.weight | [768, 768] | 589824 |
63
+ | encoder.encoder.layer.3.attention.self.value.bias | [768] | 768 |
64
+ | encoder.encoder.layer.3.attention.output.dense.weight | [768, 768] | 589824 |
65
+ | encoder.encoder.layer.3.attention.output.dense.bias | [768] | 768 |
66
+ | encoder.encoder.layer.3.attention.output.LayerNorm.weight | [768] | 768 |
67
+ | encoder.encoder.layer.3.attention.output.LayerNorm.bias | [768] | 768 |
68
+ | encoder.encoder.layer.3.intermediate.dense.weight | [3072, 768] | 2359296 |
69
+ | encoder.encoder.layer.3.intermediate.dense.bias | [3072] | 3072 |
70
+ | encoder.encoder.layer.3.output.dense.weight | [768, 3072] | 2359296 |
71
+ | encoder.encoder.layer.3.output.dense.bias | [768] | 768 |
72
+ | encoder.encoder.layer.3.output.LayerNorm.weight | [768] | 768 |
73
+ | encoder.encoder.layer.3.output.LayerNorm.bias | [768] | 768 |
74
+ | encoder.encoder.layer.4.attention.self.query.weight | [768, 768] | 589824 |
75
+ | encoder.encoder.layer.4.attention.self.query.bias | [768] | 768 |
76
+ | encoder.encoder.layer.4.attention.self.key.weight | [768, 768] | 589824 |
77
+ | encoder.encoder.layer.4.attention.self.key.bias | [768] | 768 |
78
+ | encoder.encoder.layer.4.attention.self.value.weight | [768, 768] | 589824 |
79
+ | encoder.encoder.layer.4.attention.self.value.bias | [768] | 768 |
80
+ | encoder.encoder.layer.4.attention.output.dense.weight | [768, 768] | 589824 |
81
+ | encoder.encoder.layer.4.attention.output.dense.bias | [768] | 768 |
82
+ | encoder.encoder.layer.4.attention.output.LayerNorm.weight | [768] | 768 |
83
+ | encoder.encoder.layer.4.attention.output.LayerNorm.bias | [768] | 768 |
84
+ | encoder.encoder.layer.4.intermediate.dense.weight | [3072, 768] | 2359296 |
85
+ | encoder.encoder.layer.4.intermediate.dense.bias | [3072] | 3072 |
86
+ | encoder.encoder.layer.4.output.dense.weight | [768, 3072] | 2359296 |
87
+ | encoder.encoder.layer.4.output.dense.bias | [768] | 768 |
88
+ | encoder.encoder.layer.4.output.LayerNorm.weight | [768] | 768 |
89
+ | encoder.encoder.layer.4.output.LayerNorm.bias | [768] | 768 |
90
+ | encoder.encoder.layer.5.attention.self.query.weight | [768, 768] | 589824 |
91
+ | encoder.encoder.layer.5.attention.self.query.bias | [768] | 768 |
92
+ | encoder.encoder.layer.5.attention.self.key.weight | [768, 768] | 589824 |
93
+ | encoder.encoder.layer.5.attention.self.key.bias | [768] | 768 |
94
+ | encoder.encoder.layer.5.attention.self.value.weight | [768, 768] | 589824 |
95
+ | encoder.encoder.layer.5.attention.self.value.bias | [768] | 768 |
96
+ | encoder.encoder.layer.5.attention.output.dense.weight | [768, 768] | 589824 |
97
+ | encoder.encoder.layer.5.attention.output.dense.bias | [768] | 768 |
98
+ | encoder.encoder.layer.5.attention.output.LayerNorm.weight | [768] | 768 |
99
+ | encoder.encoder.layer.5.attention.output.LayerNorm.bias | [768] | 768 |
100
+ | encoder.encoder.layer.5.intermediate.dense.weight | [3072, 768] | 2359296 |
101
+ | encoder.encoder.layer.5.intermediate.dense.bias | [3072] | 3072 |
102
+ | encoder.encoder.layer.5.output.dense.weight | [768, 3072] | 2359296 |
103
+ | encoder.encoder.layer.5.output.dense.bias | [768] | 768 |
104
+ | encoder.encoder.layer.5.output.LayerNorm.weight | [768] | 768 |
105
+ | encoder.encoder.layer.5.output.LayerNorm.bias | [768] | 768 |
106
+ | encoder.encoder.layer.6.attention.self.query.weight | [768, 768] | 589824 |
107
+ | encoder.encoder.layer.6.attention.self.query.bias | [768] | 768 |
108
+ | encoder.encoder.layer.6.attention.self.key.weight | [768, 768] | 589824 |
109
+ | encoder.encoder.layer.6.attention.self.key.bias | [768] | 768 |
110
+ | encoder.encoder.layer.6.attention.self.value.weight | [768, 768] | 589824 |
111
+ | encoder.encoder.layer.6.attention.self.value.bias | [768] | 768 |
112
+ | encoder.encoder.layer.6.attention.output.dense.weight | [768, 768] | 589824 |
113
+ | encoder.encoder.layer.6.attention.output.dense.bias | [768] | 768 |
114
+ | encoder.encoder.layer.6.attention.output.LayerNorm.weight | [768] | 768 |
115
+ | encoder.encoder.layer.6.attention.output.LayerNorm.bias | [768] | 768 |
116
+ | encoder.encoder.layer.6.intermediate.dense.weight | [3072, 768] | 2359296 |
117
+ | encoder.encoder.layer.6.intermediate.dense.bias | [3072] | 3072 |
118
+ | encoder.encoder.layer.6.output.dense.weight | [768, 3072] | 2359296 |
119
+ | encoder.encoder.layer.6.output.dense.bias | [768] | 768 |
120
+ | encoder.encoder.layer.6.output.LayerNorm.weight | [768] | 768 |
121
+ | encoder.encoder.layer.6.output.LayerNorm.bias | [768] | 768 |
122
+ | encoder.encoder.layer.7.attention.self.query.weight | [768, 768] | 589824 |
123
+ | encoder.encoder.layer.7.attention.self.query.bias | [768] | 768 |
124
+ | encoder.encoder.layer.7.attention.self.key.weight | [768, 768] | 589824 |
125
+ | encoder.encoder.layer.7.attention.self.key.bias | [768] | 768 |
126
+ | encoder.encoder.layer.7.attention.self.value.weight | [768, 768] | 589824 |
127
+ | encoder.encoder.layer.7.attention.self.value.bias | [768] | 768 |
128
+ | encoder.encoder.layer.7.attention.output.dense.weight | [768, 768] | 589824 |
129
+ | encoder.encoder.layer.7.attention.output.dense.bias | [768] | 768 |
130
+ | encoder.encoder.layer.7.attention.output.LayerNorm.weight | [768] | 768 |
131
+ | encoder.encoder.layer.7.attention.output.LayerNorm.bias | [768] | 768 |
132
+ | encoder.encoder.layer.7.intermediate.dense.weight | [3072, 768] | 2359296 |
133
+ | encoder.encoder.layer.7.intermediate.dense.bias | [3072] | 3072 |
134
+ | encoder.encoder.layer.7.output.dense.weight | [768, 3072] | 2359296 |
135
+ | encoder.encoder.layer.7.output.dense.bias | [768] | 768 |
136
+ | encoder.encoder.layer.7.output.LayerNorm.weight | [768] | 768 |
137
+ | encoder.encoder.layer.7.output.LayerNorm.bias | [768] | 768 |
138
+ | encoder.encoder.layer.8.attention.self.query.weight | [768, 768] | 589824 |
139
+ | encoder.encoder.layer.8.attention.self.query.bias | [768] | 768 |
140
+ | encoder.encoder.layer.8.attention.self.key.weight | [768, 768] | 589824 |
141
+ | encoder.encoder.layer.8.attention.self.key.bias | [768] | 768 |
142
+ | encoder.encoder.layer.8.attention.self.value.weight | [768, 768] | 589824 |
143
+ | encoder.encoder.layer.8.attention.self.value.bias | [768] | 768 |
144
+ | encoder.encoder.layer.8.attention.output.dense.weight | [768, 768] | 589824 |
145
+ | encoder.encoder.layer.8.attention.output.dense.bias | [768] | 768 |
146
+ | encoder.encoder.layer.8.attention.output.LayerNorm.weight | [768] | 768 |
147
+ | encoder.encoder.layer.8.attention.output.LayerNorm.bias | [768] | 768 |
148
+ | encoder.encoder.layer.8.intermediate.dense.weight | [3072, 768] | 2359296 |
149
+ | encoder.encoder.layer.8.intermediate.dense.bias | [3072] | 3072 |
150
+ | encoder.encoder.layer.8.output.dense.weight | [768, 3072] | 2359296 |
151
+ | encoder.encoder.layer.8.output.dense.bias | [768] | 768 |
152
+ | encoder.encoder.layer.8.output.LayerNorm.weight | [768] | 768 |
153
+ | encoder.encoder.layer.8.output.LayerNorm.bias | [768] | 768 |
154
+ | encoder.encoder.layer.9.attention.self.query.weight | [768, 768] | 589824 |
155
+ | encoder.encoder.layer.9.attention.self.query.bias | [768] | 768 |
156
+ | encoder.encoder.layer.9.attention.self.key.weight | [768, 768] | 589824 |
157
+ | encoder.encoder.layer.9.attention.self.key.bias | [768] | 768 |
158
+ | encoder.encoder.layer.9.attention.self.value.weight | [768, 768] | 589824 |
159
+ | encoder.encoder.layer.9.attention.self.value.bias | [768] | 768 |
160
+ | encoder.encoder.layer.9.attention.output.dense.weight | [768, 768] | 589824 |
161
+ | encoder.encoder.layer.9.attention.output.dense.bias | [768] | 768 |
162
+ | encoder.encoder.layer.9.attention.output.LayerNorm.weight | [768] | 768 |
163
+ | encoder.encoder.layer.9.attention.output.LayerNorm.bias | [768] | 768 |
164
+ | encoder.encoder.layer.9.intermediate.dense.weight | [3072, 768] | 2359296 |
165
+ | encoder.encoder.layer.9.intermediate.dense.bias | [3072] | 3072 |
166
+ | encoder.encoder.layer.9.output.dense.weight | [768, 3072] | 2359296 |
167
+ | encoder.encoder.layer.9.output.dense.bias | [768] | 768 |
168
+ | encoder.encoder.layer.9.output.LayerNorm.weight | [768] | 768 |
169
+ | encoder.encoder.layer.9.output.LayerNorm.bias | [768] | 768 |
170
+ | encoder.encoder.layer.10.attention.self.query.weight | [768, 768] | 589824 |
171
+ | encoder.encoder.layer.10.attention.self.query.bias | [768] | 768 |
172
+ | encoder.encoder.layer.10.attention.self.key.weight | [768, 768] | 589824 |
173
+ | encoder.encoder.layer.10.attention.self.key.bias | [768] | 768 |
174
+ | encoder.encoder.layer.10.attention.self.value.weight | [768, 768] | 589824 |
175
+ | encoder.encoder.layer.10.attention.self.value.bias | [768] | 768 |
176
+ | encoder.encoder.layer.10.attention.output.dense.weight | [768, 768] | 589824 |
177
+ | encoder.encoder.layer.10.attention.output.dense.bias | [768] | 768 |
178
+ | encoder.encoder.layer.10.attention.output.LayerNorm.weight | [768] | 768 |
179
+ | encoder.encoder.layer.10.attention.output.LayerNorm.bias | [768] | 768 |
180
+ | encoder.encoder.layer.10.intermediate.dense.weight | [3072, 768] | 2359296 |
181
+ | encoder.encoder.layer.10.intermediate.dense.bias | [3072] | 3072 |
182
+ | encoder.encoder.layer.10.output.dense.weight | [768, 3072] | 2359296 |
183
+ | encoder.encoder.layer.10.output.dense.bias | [768] | 768 |
184
+ | encoder.encoder.layer.10.output.LayerNorm.weight | [768] | 768 |
185
+ | encoder.encoder.layer.10.output.LayerNorm.bias | [768] | 768 |
186
+ | encoder.encoder.layer.11.attention.self.query.weight | [768, 768] | 589824 |
187
+ | encoder.encoder.layer.11.attention.self.query.bias | [768] | 768 |
188
+ | encoder.encoder.layer.11.attention.self.key.weight | [768, 768] | 589824 |
189
+ | encoder.encoder.layer.11.attention.self.key.bias | [768] | 768 |
190
+ | encoder.encoder.layer.11.attention.self.value.weight | [768, 768] | 589824 |
191
+ | encoder.encoder.layer.11.attention.self.value.bias | [768] | 768 |
192
+ | encoder.encoder.layer.11.attention.output.dense.weight | [768, 768] | 589824 |
193
+ | encoder.encoder.layer.11.attention.output.dense.bias | [768] | 768 |
194
+ | encoder.encoder.layer.11.attention.output.LayerNorm.weight | [768] | 768 |
195
+ | encoder.encoder.layer.11.attention.output.LayerNorm.bias | [768] | 768 |
196
+ | encoder.encoder.layer.11.intermediate.dense.weight | [3072, 768] | 2359296 |
197
+ | encoder.encoder.layer.11.intermediate.dense.bias | [3072] | 3072 |
198
+ | encoder.encoder.layer.11.output.dense.weight | [768, 3072] | 2359296 |
199
+ | encoder.encoder.layer.11.output.dense.bias | [768] | 768 |
200
+ | encoder.encoder.layer.11.output.LayerNorm.weight | [768] | 768 |
201
+ | encoder.encoder.layer.11.output.LayerNorm.bias | [768] | 768 |
202
+ | encoder.pooler.dense.weight | [768, 768] | 589824 |
203
+ | encoder.pooler.dense.bias | [768] | 768 |
204
+ +------------------------------------------------------------+--------------+----------+
205
+ 02/17/2024 13:45:41 - INFO - __main__ - Training/evaluation parameters Namespace(agg_way='avg', aug_type_way='random_replace_type', code_length=256, codebase_file='dataset/java/codebase.jsonl', config_name='DeepSoftwareAnalytics/CoCoSoDa', couninue_pre_train_data_files=['dataset/ruby/train.jsonl', 'dataset/java/train.jsonl'], data_aug_type='random_mask', data_flow_length=0, debug=False, device=device(type='cuda'), do_avg=False, do_continue_pre_trained=False, do_eval=False, do_fine_tune=False, do_ineer_loss=False, do_multi_lang_continue_pre_train=False, do_single_lang_continue_pre_train=False, do_test=True, do_train=True, do_whitening=False, do_zero_short=False, epoch=50, eval_batch_size=64, eval_data_file='dataset/java/valid.jsonl', eval_frequency=100, fp16=False, gradient_accumulation_steps=1, hidden_size=768, lang='java', learning_rate=2e-05, loaded_codebert_model_filename=None, loaded_model_filename=None, local_rank=-1, logging_steps=50, max_codeblock_num=10, max_grad_norm=1.0, max_steps=100, mlm_probability=0.1, mlp=False, moco_dim=768, moco_k=1024, moco_m=0.999, moco_t=0.07, moco_type='encoder_queue', model_name_or_path='DeepSoftwareAnalytics/CoCoSoDa', model_type='base', n_debug_samples=100, n_gpu=1, nl_length=128, num_train_epochs=5, num_warmup_steps=0, only_save_the_nl_code_vec=False, output_dir='./saved_models/fine_tune/java', print_align_unif_loss=False, save_evaluation_reuslt=False, save_evaluation_reuslt_dir=None, save_steps=50, seed=123456, test_data_file='dataset/java/test.jsonl', time_score=1, tokenizer_name='DeepSoftwareAnalytics/CoCoSoDa', train_batch_size=128, train_data_file='dataset/java/train.jsonl', use_best_mrr_model=False, weight_decay=0.01)
206
+ 02/17/2024 13:48:46 - INFO - __main__ - *** Example ***
207
+ 02/17/2024 13:48:46 - INFO - __main__ - idx: 0
208
+ 02/17/2024 13:48:46 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', '@', '_Override', '_public', '_Image', 'Source', '_apply', '_(', '_Image', 'Source', '_input', '_)', '_{', '_final', '_int', '_[', '_]', '_[', '_]', '_pixel', 'Matrix', '_=', '_new', '_int', '_[', '_3', '_]', '_[', '_3', '_]', '_;', '_int', '_w', '_=', '_input', '_.', '_getWidth', '_(', '_)', '_;', '_int', '_h', '_=', '_input', '_.', '_getHeight', '_(', '_)', '_;', '_int', '_[', '_]', '_[', '_]', '_output', '_=', '_new', '_int', '_[', '_h', '_]', '_[', '_w', '_]', '_;', '_for', '_(', '_int', '_j', '_=', '_1', '_;', '_j', '_<', '_h', '_-', '_1', '_;', '_j', '_++', '_)', '_{', '_for', '_(', '_int', '_i', '_=', '_1', '_;', '_i', '_<', '_w', '_-', '_1', '_;', '_i', '_++', '_)', '_{', '_pixel', 'Matrix', '_[', '_0', '_]', '_[', '_0', '_]', '_=', '_input', '_.', '_get', 'R', '_(', '_i', '_-', '_1', '_,', '_j', '_-', '_1', '_)', '_;', '_pixel', 'Matrix', '_[', '_0', '_]', '_[', '_1', '_]', '_=', '_input', '_.', '_get', 'RGB', '_(', '_i', '_-', '_1', '_,', '_j', '_)', '_;', '_pixel', 'Matrix', '_[', '_0', '_]', '_[', '_2', '_]', '_=', '_input', '_.', '_get', 'RGB', '_(', '_i', '_-', '_1', '_,', '_j', '_+', '_1', '_)', '_;', '_pixel', 'Matrix', '_[', '_1', '_]', '_[', '_0', '_]', '_=', '_input', '_.', '_get', 'RGB', '_(', '_i', '_,', '_j', '_-', '_1', '_)', '_;', '_pixel', 'Matrix', '_[', '_1', '_]', '_[', '_2', '_]', '_=', '_input', '_.', '_get', 'RGB', '_(', '_i', '_,', '_j', '_+', '_1', '_)', '_;', '_pixel', 'Matrix', '_[', '_2', '_]', '_[', '_0', '_]', '_=', '_input', '_.', '_get', 'RGB', '_(', '_i', '_+', '_1', '_,', '_j', '_-', '_1', '_)', '_;', '_pixel', 'Matrix', '_[', '_2', '_]', '_[', '_1', '_]', '_=', '_input', '_.', '_get', 'RGB', '_(', '_i', '_+', '_1', '_,', '_j', '_)', '_;', '_pixel', '</s>']
209
+ 02/17/2024 13:48:46 - INFO - __main__ - code_ids: 0 6 2 150 19505 1240 6085 1768 5230 400 6085 1768 1586 743 399 1920 554 626 2406 626 2406 5578 3679 385 579 554 626 995 2406 626 995 2406 2476 554 477 385 1586 746 32671 400 743 2476 554 566 385 1586 746 32720 400 743 2476 554 626 2406 626 2406 1721 385 579 554 626 566 2406 626 477 2406 2476 563 400 554 913 385 524 2476 913 517 566 581 524 2476 913 1932 743 399 563 400 554 548 385 524 2476 548 517 477 581 524 2476 548 1932 743 399 5578 3679 626 461 2406 626 461 2406 385 1586 746 744 168 400 548 581 524 2019 913 581 524 743 2476 5578 3679 626 461 2406 626 524 2406 385 1586 746 744 7664 400 548 581 524 2019 913 743 2476 5578 3679 626 461 2406 626 688 2406 385 1586 746 744 7664 400 548 581 524 2019 913 513 524 743 2476 5578 3679 626 524 2406 626 461 2406 385 1586 746 744 7664 400 548 2019 913 581 524 743 2476 5578 3679 626 524 2406 626 688 2406 385 1586 746 744 7664 400 548 2019 913 513 524 743 2476 5578 3679 626 688 2406 626 461 2406 385 1586 746 744 7664 400 548 513 524 2019 913 581 524 743 2476 5578 3679 626 688 2406 626 524 2406 385 1586 746 744 7664 400 548 513 524 2019 913 743 2476 5578 2
210
+ 02/17/2024 13:48:46 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Expect', 's', '_a', '_height', '_mat', '_as', '_input', '</s>']
211
+ 02/17/2024 13:48:46 - INFO - __main__ - nl_ids: 0 6 2 7871 201 434 3082 5772 880 1586 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
212
+ 02/17/2024 13:48:46 - INFO - __main__ - *** Example ***
213
+ 02/17/2024 13:48:46 - INFO - __main__ - idx: 1
214
+ 02/17/2024 13:48:46 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'public', '_<', '_L', 'extends', 'Listener', '_>', '_void', '_pop', 'Event', '_(', '_Event', '_<', '_?', '_,', '_L', '_>', '_expected', '_)', '_{', '_synchronized', '_(', '_this', '_.', '_stack', '_)', '_{', '_final', '_Event', '_<', '_?', '_,', '_?', '_>', '_actual', '_=', '_this', '_.', '_stack', '_.', '_pop', '_(', '_)', '_;', '_if', '_(', '_actual', '_!=', '_expected', '_)', '_{', '_throw', '_new', '_IllegalStateException', '_(', '_String', '_.', '_format', '_(', '"', 'Un', 'balanced', '_pop', ':', '_expected', "_'%", 's', "'", '_but', '_encountered', "_'%", 's', "'", '"', ',', '_expected', '_.', '_get', 'Listener', 'Class', '_(', '_)', '_,', '_actual', '_)', '_)', '_;', '_}', '_}', '_}', '</s>']
215
+ 02/17/2024 13:48:46 - INFO - __main__ - code_ids: 0 6 2 653 517 747 13125 2486 711 723 5012 1089 400 3916 517 999 2019 747 711 2048 743 399 9401 400 547 746 3325 743 399 1920 3916 517 999 2019 999 711 3780 385 547 746 3325 746 5012 400 743 2476 462 400 3780 620 2048 743 399 1185 579 16219 400 1167 746 2021 400 120 965 37707 5012 144 2048 3421 201 125 2107 17038 3421 201 125 120 130 2048 746 744 2486 1128 400 743 2019 3780 743 743 2476 425 425 425 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
216
+ 02/17/2024 13:48:46 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'P', 'ops', '_the', '_top', '_event', '_off', '_the', '_current', '_event', '_stack', '_.', '_This', '_action', '_has', '_to', '_be', '_performed', '_immediately', '_after', '_the', '_event', '_has', '_been', '_dispatched', '_to', '_all', '_listeners', '_.', '</s>']
217
+ 02/17/2024 13:48:46 - INFO - __main__ - nl_ids: 0 6 2 166 2489 448 3194 1488 3413 448 1434 1488 3325 746 1600 2657 1559 508 661 13181 10086 2493 448 1488 1559 3022 43340 508 1345 11839 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
218
+ 02/17/2024 13:48:46 - INFO - __main__ - *** Example ***
219
+ 02/17/2024 13:48:46 - INFO - __main__ - idx: 2
220
+ 02/17/2024 13:48:46 - INFO - __main__ - code_tokens: ['<s>', '<encoder-only>', '</s>', 'protected', '_void', '_modify', '_(', '_Transaction', '_t', '_)', '_{', '_try', '_{', '_this', '_.', '_lock', '_.', '_write', 'Lock', '_(', '_)', '_.', '_lock', '_(', '_)', '_;', '_t', '_.', '_perform', '_(', '_)', '_;', '_}', '_finally', '_{', '_this', '_.', '_lock', '_.', '_write', 'Lock', '_(', '_)', '_.', '_unlock', '_(', '_)', '_;', '_}', '_}', '</s>']
221
+ 02/17/2024 13:48:46 - INFO - __main__ - code_ids: 0 6 2 1933 723 8660 400 13081 422 743 399 1568 399 547 746 3505 746 2250 2896 400 743 746 3505 400 743 2476 422 746 4729 400 743 2476 425 6110 399 547 746 3505 746 2250 2896 400 743 746 14552 400 743 2476 425 425 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
222
+ 02/17/2024 13:48:46 - INFO - __main__ - nl_tokens: ['<s>', '<encoder-only>', '</s>', 'Executes', '_the', '_given', '_transaction', '_within', '_the', '_con', 'text', 'of', '_a', '_write', '_lock', '_.', '</s>']
223
+ 02/17/2024 13:48:46 - INFO - __main__ - nl_ids: 0 6 2 40551 448 2076 4993 5289 448 549 625 757 434 2250 3505 746 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
224
+ 02/17/2024 13:48:46 - INFO - __main__ - ***** Running training *****
225
+ 02/17/2024 13:48:46 - INFO - __main__ - Num examples = 164923
226
+ 02/17/2024 13:48:46 - INFO - __main__ - Num Epochs = 5
227
+ 02/17/2024 13:48:46 - INFO - __main__ - Num quene = 1024
228
+ 02/17/2024 13:48:46 - INFO - __main__ - Instantaneous batch size per GPU = 128
229
+ 02/17/2024 13:48:46 - INFO - __main__ - Total train batch size = 128
230
+ 02/17/2024 13:48:46 - INFO - __main__ - Total optimization steps = 6440
231
+ Traceback (most recent call last):
232
+ File "run.py", line 1188, in <module>
233
+ main()
234
+ File "run.py", line 1154, in main
235
+ train(args, model, tokenizer, pool)
236
+ File "run.py", line 585, in train
237
+ code_vec = model(code_inputs=code_inputs)
238
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
239
+ return forward_call(*input, **kwargs)
240
+ File "/home/yiming/cocosoda/CoCoSoDa/model.py", line 40, in forward
241
+ outputs = self.encoder(code_inputs,attention_mask=code_inputs.ne(1))[0] #[bs, seq_len, dim]
242
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1120, in _call_impl
243
+ result = forward_call(*input, **kwargs)
244
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/transformers/models/roberta/modeling_roberta.py", line 860, in forward
245
+ return_dict=return_dict,
246
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
247
+ return forward_call(*input, **kwargs)
248
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/transformers/models/roberta/modeling_roberta.py", line 531, in forward
249
+ output_attentions,
250
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
251
+ return forward_call(*input, **kwargs)
252
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/transformers/models/roberta/modeling_roberta.py", line 415, in forward
253
+ past_key_value=self_attn_past_key_value,
254
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
255
+ return forward_call(*input, **kwargs)
256
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/transformers/models/roberta/modeling_roberta.py", line 344, in forward
257
+ output_attentions,
258
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
259
+ return forward_call(*input, **kwargs)
260
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/transformers/models/roberta/modeling_roberta.py", line 267, in forward
261
+ attention_probs = self.dropout(attention_probs)
262
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
263
+ return forward_call(*input, **kwargs)
264
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/modules/dropout.py", line 58, in forward
265
+ return F.dropout(input, self.p, self.training, self.inplace)
266
+ File "/home/yiming/anaconda3/envs/CoCoSoDa/lib/python3.6/site-packages/torch/nn/functional.py", line 1169, in dropout
267
+ return _VF.dropout_(input, p, training) if inplace else _VF.dropout(input, p, training)
268
+ RuntimeError: CUDA out of memory. Tried to allocate 384.00 MiB (GPU 0; 14.75 GiB total capacity; 12.96 GiB already allocated; 173.94 MiB free; 13.02 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
saved_models/fine_tune/ruby/0/model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8e9079fe0c63cf5b89b754bbcbd82424a11bf0bd9e5af6f5714c6d5a4c5a42d
3
+ size 1524384769
saved_models/fine_tune/ruby/1/all_code_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d853b87902ece32e8427671590a29d8e69153f352fdbbcb89c9b2fa09df03f1e
3
+ size 76575872
saved_models/fine_tune/ruby/1/all_nl_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:321dfa145a7cfc4e5176980a2354cdafea7a48043288a88c65c831b15462dbfa
3
+ size 76575872
saved_models/fine_tune/ruby/1/model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4b64b0755d42a48072d1390d69a1d0979aaa779eee94bc63444511ddd59b793
3
+ size 1524384769
saved_models/fine_tune/ruby/1/test_all_code_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b907f0004db84850c59214fc63e8b59eddfab8127fb435712632eaec0ec07fb0
3
+ size 3873920
saved_models/fine_tune/ruby/1/test_all_nl_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa8eecb652e9879e0cd5bef34fb8ce16adc43b88cb097f00a39ccb538861308e
3
+ size 3873920
saved_models/fine_tune/ruby/2/all_code_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2c34ce22cef54b838cb15be43f74ce72cba04ff7c3523ec16923db2e3cc479f
3
+ size 76575872
saved_models/fine_tune/ruby/2/all_nl_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:470bce39b439f6151ca0acabb6c5b3754f92a9f4cdd63bf29cabd88fac57e26f
3
+ size 76575872
saved_models/fine_tune/ruby/2/model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fdc86d2b72e082fc9ab35102f060ae270f952b2755d26ff492a0ec8fc5b19ee
3
+ size 1524384769
saved_models/fine_tune/ruby/2/test_all_code_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d5eea680c7a2423d1e7e482e5850a935fd6c977c94c595992e766beba1a42a5
3
+ size 3873920
saved_models/fine_tune/ruby/2/test_all_nl_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a30742e7e82e6d0ca1533773cf5aa747b346ca102f8526e8fa5170f56e88657a
3
+ size 3873920
saved_models/fine_tune/ruby/3/all_code_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70f73384f0d8a01e3c6208c534d295d2c2cd1af98dee5cd1fb7dc046fde88567
3
+ size 76575872
saved_models/fine_tune/ruby/3/all_nl_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c8e440149458ad89a9ce02f62d2d050b51f4d7d23f1d044f53bdde25c541526
3
+ size 76575872
saved_models/fine_tune/ruby/3/model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bce2703c09f8b5c78aa2a0c31b92f80a0fca266dbab3101927552f3998c5794
3
+ size 1524384769
saved_models/fine_tune/ruby/3/test_all_code_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9dd02d38f7aad13eea34fcdc02d24857437a5a48e5f813ef7659717edc03961
3
+ size 3873920
saved_models/fine_tune/ruby/3/test_all_nl_vec.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d367df01e5f400124be2aefbf77eb39bc5dc575b30db1f7593bad1f6949d742
3
+ size 3873920
saved_models/fine_tune/ruby/4/model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e507b62594fe1d7cebbabf653d559acb9e9a72f9d31b57ea53721bb52e26d228
3
+ size 1524384769
saved_models/fine_tune/ruby/checkpoint-best-mrr/model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e507b62594fe1d7cebbabf653d559acb9e9a72f9d31b57ea53721bb52e26d228
3
+ size 1524384769
saved_models/fine_tune/ruby/docstring_list.json ADDED
The diff for this file is too large to render. See raw diff
 
saved_models/fine_tune/ruby/result.jsonl ADDED
@@ -0,0 +1 @@
 
 
1
+ {"R@1": 0.643, "R@5": 0.875, "R@10": 0.923, "eval_mrr": 0.746}
saved_models/fine_tune/ruby/running.log ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ 02/20/2024 16:37:50 - INFO - __main__ - device: cuda, n_gpu: 2
2
+ 24927
3
+ 24927
4
+ 1261
5
+ 1261