(self, label_path, train_label_path, test_label_path)
| 194 | fout.write("\n") |
| 195 | |
| 196 | def write_node_label(self, label_path, train_label_path, test_label_path): |
| 197 | with open(label_path, 'w', encoding='utf-8') as label_f, \ |
| 198 | open(train_label_path, 'w', encoding='utf-8') as train_label_f, \ |
| 199 | open(test_label_path, 'w', encoding='utf-8') as test_label_f: |
| 200 | for node in self.next_node(): |
| 201 | node_str = EmbedxNode.get_node_label_str(node) |
| 202 | label_f.write(node_str) |
| 203 | label_f.write("\n") |
| 204 | if node.stage == "train": |
| 205 | train_label_f.write(node_str) |
| 206 | train_label_f.write("\n") |
| 207 | if node.stage == "test": |
| 208 | test_label_f.write(node_str) |
| 209 | test_label_f.write("\n") |
| 210 | |
| 211 | def __has_feature(self): |
| 212 | flag = None |
no test coverage detected