AttributeError crash in async exclude_edges for heterographs
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_'`.
https://github.com/dmlc/dgl/blob/3d16000b4170fa741ed9e9667f22ba84d3493026/python/dgl/graphbolt/sampled_subgraph.py#L36-L37
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.
0 条评论