-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
When using the asynchronous version of exclude_edges (or exclude_seed_edges) on a heterogeneous graph, the program crashes if the set of edges to exclude doesn't cover all edge types present in the SampledSubgraph.
The _ExcludeEdgesWaiter.wait() method unconditionally calls .wait() on its internal futures, but for edge types with no edges to exclude, the value is None, which leads to an _AttributeError: 'NoneType' object has no attribute 'wait_'.
dgl/python/dgl/graphbolt/sampled_subgraph.py
Lines 36 to 37 in 3d16000
| for k in list(index.keys()): | |
| index[k] = index[k].wait() |
It iterates through its internal dictionary and calls .wait() on every value, but it does not check if a value is None first.
A simple fix would be to add a if value is not None: check before the call.