-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to_dgl
and from_dgl
conversions
#7053
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7053 +/- ##
==========================================
- Coverage 91.47% 91.27% -0.20%
==========================================
Files 436 436
Lines 23836 23891 +55
==========================================
+ Hits 21803 21806 +3
- Misses 2033 2085 +52
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Please also includes some test cases for these two functions.
Co-authored-by: Jintang Li <cnljt@outlook.com>
Co-authored-by: Jintang Li <cnljt@outlook.com>
Co-authored-by: Jintang Li <cnljt@outlook.com>
for more information, see https://pre-commit.ci
…eometric into feature/dgl-converter
for more information, see https://pre-commit.ci
@EdisonLeeeee I added the tests, but for some reason, codecov complains about not seeing them. I ran |
@hbenedek Don't worry about it. It's good that we have a test but it's not called by CI due to missing dependency. |
Thank you very much @rusty1s and @EdisonLeeeee, this was a lot of fun to work on :) |
Great PR, thanks for doing that :) |
@hbenedek thank you, too :D |
Issue #6979
Description
I add two functions
from_dgl(dgl.Graph) -> data: Union[Data, HeteroData]
andto_dgl(Union[Data, HeteroData]) -> dgl.Graph
inutils/convert.py
. Both function in both direction performs the same three operations, setting the node and edge attributes and copies the edges of the underlying graph(s).