MCPcopy
hub / github.com/THUDM/CogDL / process

Method process

tests/datasets/test_customized_data.py:37–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35 super(MyGraphClassificationDataset, self).__init__(path)
36
37 def process(self):
38 graphs = []
39 for i in range(200):
40 edges = torch.randint(0, 1000, (2, 30))
41 label = torch.randint(0, 7, (1,))
42 graphs.append(Graph(edge_index=edges, y=label))
43 torch.save(graphs, self.path)
44 return graphs
45
46
47def test_customized_dataset():

Callers

nothing calls this directly

Calls 1

GraphClass · 0.90

Tested by

no test coverage detected