Change module scope - #71
Merged
Merged
Conversation
shenyangHuang
approved these changes
Jul 1, 2025
shenyangHuang
left a comment
Collaborator
There was a problem hiding this comment.
I agree with this change, much more intuitive
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The purpose of this PR is to move
DGraphandDGBatchinto top level scope. This enables imports like:which seems better (in the same was DataFrame and tensors are in top level pandas and pytorch scope, for instance).
Key Changes
DGraphandDGBatchinto top level scopepandasimport for type check inDGraph(since user may not have it). This was caught by the docker image build smoke testThings to keep in mind
DGDataLoaderin separate module similar to torchDGDatais left as is since its mostly private (users can just construct DGraphs, not worry about internal IO)TimeDeltaDGis on the fence, but I will likely changeDGraphconstructor to take a string so that user never has to explicitly construct a time delta (Let DGraph constructor take TimeDelta as a string #72):Relevant Prs
Close #68