18a26fcfb1983af7fba69db9bdce7ba5e6a9945f,python/dgl/data/graph_serialize.py,,load_labels,#Any#,149

Before Change


    >>> label_dict = load_graphs("./data.bin")

    
    metadata = _CAPI_DGLLoadGraphs(filename, [], True)
    label_dict = {}
    for k, v in metadata.labels.items():
        label_dict[k] = F.zerocopy_from_dgl_ndarray(v.data)
    return label_dict

After Change



    
    version = _CAPI_GetFileVersion(filename)
    if version == 1:
        return load_labels_v1(filename)
    elif version == 2:
        return load_labels_v2(filename)
    else:
        raise Exception("Invalid DGL Version Number")


def load_labels_v2(filename):
    Internal functions for loading labels from V2 format
    label_dict = {}
    nd_dict = _CAPI_LoadLabels_V2(filename)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

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_labels


Project Name: pantsbuild/pants
Commit Name: ef3f8d221a5afefb01d655448ce7e3f537399810
Time: 2016-01-26
Author: stuhood@gmail.com
File Name: src/python/pants/engine/exp/engine.py
Class Name: LocalMultiprocessEngine
Method Name: reduce


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