Skip to content

Commit

Permalink
cleanup: adapter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed Oct 6, 2023
1 parent 92cd0c0 commit 3005ba2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions adbpyg_adapter/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,16 +1019,14 @@ def __set_adb_data(
valid_meta: Dict[Any, PyGMetagraphValues]
valid_meta = meta if type(meta) is dict else {m: m for m in meta}

if is_explicit_metagraph:
pyg_keys = set(valid_meta.keys())
else:
# can't do pyg_data.keys() (not compatible with Homogeneous graphs)
pyg_keys = set(k for k, _ in pyg_data.items())

for meta_key in pyg_keys:
if meta_key == "edge_index":
continue
pyg_keys = (
set(valid_meta.keys())
if is_explicit_metagraph
# pyg_data.keys() is not compatible with Homogeneous graphs:
else set(k for k, _ in pyg_data.items())
)

for meta_key in pyg_keys - {"edge_index"}:
data = pyg_data[meta_key]
meta_val = valid_meta.get(meta_key, str(meta_key))

Expand Down

0 comments on commit 3005ba2

Please sign in to comment.