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

Method load

python/dgl/data/rdf.py:436–450  ·  view source on GitHub ↗

load the graph list and the labels from disk

(self)

Source from the content-addressed store, hash-verified

434 )
435
436 def load(self):
437 """load the graph list and the labels from disk"""
438 graph_path = os.path.join(self.save_path, self.save_name + ".bin")
439 info_path = os.path.join(self.save_path, self.save_name + ".pkl")
440 graphs, _ = load_graphs(str(graph_path))
441
442 info = load_info(str(info_path))
443 self._num_classes = info["num_classes"]
444 self._predict_category = info["predict_category"]
445 self._hg = graphs[0]
446 # For backward compatibility
447 if "label" not in self._hg.nodes[self.predict_category].data:
448 self._hg.nodes[self.predict_category].data[
449 "label"
450 ] = self._hg.nodes[self.predict_category].data["labels"]
451
452 def __getitem__(self, idx):
453 r"""Gets the graph object"""

Callers

nothing calls this directly

Calls 3

load_graphsFunction · 0.85
load_infoFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected