dmlc / dmlc/dgl

remove edge in local_scope causes a bug

Open
#4,653 1 comment 0 reactions 0 assignees View on GitHub
bug:confirmed
Dominant language
Python
Stars
14.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug

## To Reproduce

Steps to reproduce the behavior:

```
g = dgl.graph(([0, 1, 1, 2, 2, 3], [1, 2, 3, 3, 4, 5]))
g.edata['x'] = torch.ones(g.num_edges())

with g.local_scope():
g.remove_edges(torch.tensor([1]))

g.edata['z'] = torch.ones(g.num_edges())
```
The remove_edges op is supposed to remove the edata also, but due to the local_scope it failed.
And the mismatch of the two edata will cause an error.

## Expected behavior

## Environment

- DGL Version (e.g., 1.0):
- Backend Library & Version (e.g., PyTorch 0.4.1, MXNet/Gluon 1.3):
- OS (e.g., Linux):
- How you installed DGL (`conda`, `pip`, source):
- Build command you used (if compiling from source):
- Python version:
- CUDA/cuDNN version (if applicable):
- GPU models and configuration (e.g. V100):
- Any other relevant information:

## Additional context

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.