Load query2box data into a list of examples.
(self, name)
| 551 | return all_entity_is_cvt |
| 552 | |
| 553 | def construct_query2box(self, name): |
| 554 | """Load query2box data into a list of examples.""" |
| 555 | task = name.split('_')[-1] |
| 556 | # we don't train our model in the same way as query2box, |
| 557 | # so we won't load their training data. |
| 558 | test_data = pickle.load( |
| 559 | gfile.GFile(self.root_dir + 'test_ans_%s.pkl' % task, 'rb')) |
| 560 | |
| 561 | converted_test_data = list() |
| 562 | for query, unused_answers in test_data.items(): |
| 563 | converted_test_data.append(query) |
| 564 | |
| 565 | return None, converted_test_data |
| 566 | |
| 567 | ############################################################## |
| 568 | ###################### Build tf.dataset ###################### |
no test coverage detected