dgl icon indicating copy to clipboard operation
dgl copied to clipboard

[Misc] Fix edge_ids()'s error messages

Open songqing opened this issue 8 months 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