MCPcopy
hub / github.com/THUDM/CogDL / local_graph

Method local_graph

cogdl/data/data.py:595–604  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

593
594 @contextmanager
595 def local_graph(self):
596 self.__temp_adj_stack__.append(self._adj)
597 adj = copy.copy(self._adj)
598 others = [(key, val) for key, val in self.__dict__.items() if not key.startswith("__") and "adj" not in key]
599 self._adj = adj
600 yield
601 del adj
602 self._adj = self.__temp_adj_stack__.pop()
603 for key, val in others:
604 self[key] = val
605
606 @property
607 def edge_index(self):

Callers 15

1graph.pyFile · 0.80
1graph_cn.pyFile · 0.80
_preprocessingMethod · 0.80
mini_forwardMethod · 0.80
edge_softmax_valFunction · 0.80
mh_spmmFunction · 0.80
homo_indexFunction · 0.80
train_stepMethod · 0.80
val_stepMethod · 0.80
test_stepMethod · 0.80
train_stepMethod · 0.80
eval_stepMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_stepMethod · 0.64