"Internal functions for loading DGLGraphs (V0).
(filename, idx_list=None)
| 208 | |
| 209 | |
| 210 | def 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 | |
| 222 | def load_labels(filename): |
no test coverage detected