dgl icon indicating copy to clipboard operation
dgl copied to clipboard

[Misc] Fix edge_ids()'s error messages

Open songqing opened this issue 1 year ago • 3 comments

Description

When calling edge_ids(), if there are more than one invalid edges, the error message can't print any invalid (src, dst) value, but only print "ValueError: only one element tensors can be converted to Python scalars", fix it.

Checklist

Please feel free to remove inapplicable items for your PR.

  • [ ] The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • [ ] I've leverage the tools to beautify the python and c++ code.
  • [ ] The PR is complete and small, read the Google eng practice (CL equals to PR) to understand more about small PR. In DGL, we consider PRs with less than 200 lines of core code change are small (example, test and documentation could be exempted).
  • [ ] All changes have test coverage
  • [ ] Code is well-documented
  • [ ] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
  • [ ] Related issue is referred in this PR
  • [ ] If the PR is for a new model/paper, I've updated the example index here.

Changes

songqing avatar May 29 '24 01:05 songqing

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar May 29 '24 01:05 dgl-bot

Commit ID: dbcc7ee3243b603a4240ad646a6dc838c76ed280

Build ID: 1

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar May 29 '24 01:05 dgl-bot

@Rhett-Ying could you help review this small PR? if no error message, we can't easily found the error edges

songqing avatar May 30 '24 03:05 songqing