18a26fcfb1983af7fba69db9bdce7ba5e6a9945f,python/dgl/data/graph_serialize.py,,save_graphs,#Any#Any#Any#,63
Before Change
if isinstance(g_list, DGLGraph):
g_list = [g_list]
if (labels is not None) and (len(labels) != 0):
label_dict = dict()
for key, value in labels.items():
label_dict[key] = F.zerocopy_to_dgl_ndarray(value)
After Change
g_sample = g_list[0] if isinstance(g_list, list) else g_list
if isinstance(g_sample, DGLGraph):
save_dglgraphs(filename, g_list, labels)
elif isinstance(g_sample, DGLHeteroGraph):
save_heterographs(filename, g_list, labels)
else:
raise Exception(
"Invalid argument g_list. Must be a DGLGraph or a list of DGLGraphs/DGLHeteroGraphs")
def save_dglgraphs(filename, g_list, labels=None):
Internal function to save DGLGraphs
if isinstance(g_list, DGLGraph):
g_list = [g_list]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: save_graphs
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: pysb/pysb
Commit Name: 47374cd825213029b578e5a22ba9836c0f55d97a
Time: 2015-07-03
Author: oo.ortega2247@gmail.com
File Name: pysb/tools/pysb_pyurdme.py
Class Name: PyurdmeSimulator
Method Name: run