MCPcopy
hub / github.com/dmlc/dgl / load

Method load

python/dgl/data/citation_graph.py:884–897  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

882 print("Done saving data into cached files.")
883
884 def load(self):
885 self.graphs, labels = load_graphs(str(self.graph_path))
886
887 self.labels = []
888 for i in range(len(labels)):
889 self.labels.append(F.asnumpy(labels["{}".format(i)]))
890 # load pmpds under self.raw_path
891 with open("{}/pmpds.pkl".format(self.raw_path), "rb") as f:
892 self.pmpds = _pickle_load(f)
893 if self.verbose:
894 print("Done loading data into cached files.")
895 # sanity check
896 assert len(self.graphs) == len(self.pmpds)
897 assert len(self.graphs) == len(self.labels)
898
899 def __len__(self):
900 return len(self.graphs)

Callers 1

_pickle_loadFunction · 0.45

Calls 5

load_graphsFunction · 0.85
_pickle_loadFunction · 0.85
appendMethod · 0.80
asnumpyMethod · 0.80
formatMethod · 0.80

Tested by

no test coverage detected