Skip to content
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

[Dataset] Change the Data Type of the Node Features in GINDataset/TUDataset from Float64 to Float32 #2592

Merged
merged 12 commits into from Feb 3, 2021

Conversation

mufeili
Copy link
Member

@mufeili mufeili commented Jan 29, 2021

Description

As reported in this thread by @hengruizhang98 , the node feature attr of the graphs in GINDataset has a data type of float64 rather than float32. This PR addresses the issue in instantiating the datasets.

@BarclayII @jermainewang This is not a critical issue and we may merge it after we are done with 0.6 release.

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented
  • To the my best 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.

@hetong007
Copy link
Member

Should we apply this as a standard practice to other graph classification datasets (e.g. TU)?

Currently in the example, we have lines converting the dtype:

https://github.com/dmlc/dgl/blob/master/examples/pytorch/gin/main.py#L25-L26
https://github.com/dmlc/dgl/blob/master/examples/pytorch/sagpool/main.py#L85-L86
https://github.com/dmlc/dgl/blob/master/examples/pytorch/hgp_sl/main.py#L93-L94

@mufeili mufeili changed the title [Dataset] Change the Data Type of the Node Features in GINDataset from Float64 to Float32 [Dataset] Change the Data Type of the Node Features in GINDataset/TUDataset from Float64 to Float32 Feb 2, 2021
@mufeili
Copy link
Member Author

mufeili commented Feb 2, 2021

Should we apply this as a standard practice to other graph classification datasets (e.g. TU)?

Currently in the example, we have lines converting the dtype:

https://github.com/dmlc/dgl/blob/master/examples/pytorch/gin/main.py#L25-L26
https://github.com/dmlc/dgl/blob/master/examples/pytorch/sagpool/main.py#L85-L86
https://github.com/dmlc/dgl/blob/master/examples/pytorch/hgp_sl/main.py#L93-L94

Good point. Updated.

@hetong007
Copy link
Member

Sorry I just found these two files have the same lines, could you please clean them up together?

https://github.com/dmlc/dgl/blob/master/examples/pytorch/gxn/main.py
https://github.com/dmlc/dgl/blob/master/examples/pytorch/gxn/main_early_stop.py

Otherwise LGTM, thanks!

@mufeili
Copy link
Member Author

mufeili commented Feb 3, 2021

Sorry I just found these two files have the same lines, could you please clean them up together?

https://github.com/dmlc/dgl/blob/master/examples/pytorch/gxn/main.py
https://github.com/dmlc/dgl/blob/master/examples/pytorch/gxn/main_early_stop.py

Otherwise LGTM, thanks!

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants