MCPcopy Index your code
hub / github.com/dmlc/dgl / load_graph_v1

Function load_graph_v1

python/dgl/data/graph_serialize.py:210–219  ·  view source on GitHub ↗

"Internal functions for loading DGLGraphs (V0).

(filename, idx_list=None)

Source from the content-addressed store, hash-verified

208
209
210def load_graph_v1(filename, idx_list=None):
211 """ "Internal functions for loading DGLGraphs (V0)."""
212 if idx_list is None:
213 idx_list = []
214 assert isinstance(idx_list, list)
215 metadata = _CAPI_LoadGraphFiles_V1(filename, idx_list, False)
216 label_dict = {}
217 for k, v in metadata.labels.items():
218 label_dict[k] = F.zerocopy_from_dgl_ndarray(v)
219 return [gdata.get_graph() for gdata in metadata.graph_data], label_dict
220
221
222def load_labels(filename):

Callers 1

load_graphsFunction · 0.85

Calls 2

itemsMethod · 0.45
get_graphMethod · 0.45

Tested by

no test coverage detected