Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update heterograph.py #6506

Merged
merged 8 commits into from
Nov 16, 2023
Merged
8 changes: 5 additions & 3 deletions python/dgl/heterograph.py
Original file line number Diff line number Diff line change
Expand Up @@ -6061,9 +6061,11 @@ def local_scope(self):
old_eframes = self._edge_frames
self._node_frames = [fr.clone() for fr in self._node_frames]
self._edge_frames = [fr.clone() for fr in self._edge_frames]
yield
self._node_frames = old_nframes
self._edge_frames = old_eframes
try:
willarliss marked this conversation as resolved.
Show resolved Hide resolved
yield
finally:
self._node_frames = old_nframes
self._edge_frames = old_eframes

def formats(self, formats=None):
r"""Get a cloned graph with the specified allowed sparse format(s) or
Expand Down