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

Method process

python/dgl/data/synthetic.py:793–804  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

791 download(self.url, path=file_path)
792
793 def process(self):
794 file_path = os.path.join(self.raw_dir, self.name + ".pkl")
795 with open(file_path, "rb") as f:
796 adjs, features, labels = pickle.load(f)
797
798 self.graphs = []
799 self.labels = F.tensor(labels, F.int64)
800
801 for i in range(len(adjs)):
802 g = graph(adjs[i].nonzero())
803 g.ndata["feat"] = F.zerocopy_from_numpy(features[i])
804 self.graphs.append(g)
805
806 @property
807 def graph_path(self):

Callers

nothing calls this directly

Calls 5

graphFunction · 0.85
nonzeroMethod · 0.80
appendMethod · 0.80
joinMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected