18a26fcfb1983af7fba69db9bdce7ba5e6a9945f,python/dgl/data/graph_serialize.py,,load_graphs,#Any#Any#,111

Before Change



    
    if idx_list is None:
        idx_list = []
    assert isinstance(idx_list, list)
    metadata = _CAPI_DGLLoadGraphs(filename, idx_list, False)
    label_dict = {}
    for k, v in metadata.labels.items():
        label_dict[k] = F.zerocopy_from_dgl_ndarray(v.data)

    return [gdata.get_graph() for gdata in metadata.graph_data], label_dict


def load_labels(filename):

After Change



    
    version = _CAPI_GetFileVersion(filename)
    if version == 1:
        return load_graph_v1(filename, idx_list)
    elif version == 2:
        return load_graph_v2(filename, idx_list)
    else:
        raise Exception("Invalid DGL Version Number")


def load_graph_v2(filename, idx_list=None):
    Internal functions for loading DGLHeteroGraphs.
    if idx_list is None:
        idx_list = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: dmlc/dgl
Commit Name: 18a26fcfb1983af7fba69db9bdce7ba5e6a9945f
Time: 2020-06-29
Author: VoVAllen@users.noreply.github.com
File Name: python/dgl/data/graph_serialize.py
Class Name:
Method Name: load_graphs


Project Name: albu/albumentations
Commit Name: 9942689f9846c59006c80718ee8db38e02ee2104
Time: 2019-09-27
Author: al.buslaev@gmail.com
File Name: albumentations/core/transforms_interface.py
Class Name: BasicTransform
Method Name: __call__


Project Name: dmlc/dgl
Commit Name: 18a26fcfb1983af7fba69db9bdce7ba5e6a9945f
Time: 2020-06-29
Author: VoVAllen@users.noreply.github.com
File Name: python/dgl/data/graph_serialize.py
Class Name:
Method Name: load_labels