MCPcopy Create free account
hub / github.com/alibaba/euler / test_data

Class test_data

tf_euler/python/dataset/test_data.py:29–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29class test_data(DataSet):
30
31 def __init__(self, data_dir=data_dir, data_type='all'):
32 super(test_data, self).__init__(data_dir, data_type)
33 self.source_url = '/Euler-2.0/tools/test_data'
34 self.meta_file = os.path.join(data_dir, 'meta')
35 self.partition_num = 2
36 self.origin_files = ['meta']
37 self.max_node_id = 6
38 self.train_node_type = [0, 1]
39 self.train_edge_type = [0, 1]
40 self.total_size = 6
41 self.all_node_type = -1
42 self.all_edge_type = [0, 1]
43 self.id_file = ''
44
45 def download_data(self, source_url, out_dir):
46 shell_cmd = 'cp ' + self.source_url + '/meta ' + self.meta_file
47 os.system(shell_cmd)
48
49 def convert2json(self, convert_dir, out_dir):
50 shell_cmd = 'cp ' + self.source_url + '/graph.json ' + out_dir
51 os.system(shell_cmd)

Callers 1

get_datasetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected