dmlc / dmlc/dgl

AttributeError crash in async exclude_edges for heterographs

Open
#7,902 1 comment 0 reactions 0 assignees View on GitHub
stale-issue
Dominant language
Python
Stars
14.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

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_'`.

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.