[REVIEW] Allow passing a dict in feat_name for add_edge_data and add_node_data#2795
Conversation
| feat_name=None, | ||
| contains_vector_features=False, | ||
| ): |
There was a problem hiding this comment.
Changed to this to keep the API cleaner and intuitive as you would want to provide feat_name together with contains_vector_features
| tensor = tensor.to(device) | ||
| else: | ||
| return tensor | ||
| return tensor |
There was a problem hiding this comment.
Fixed an error here when a user provides device, cant test this as that needs Pytorch installed here.
| self.__clear_cached_properties() | ||
|
|
||
| def get_node_storage(self, feat_name, ntype=None): | ||
| def get_node_storage(self, key, ntype=None, indices_offset=0): |
There was a problem hiding this comment.
Changed to key to match DGL.
There was a problem hiding this comment.
| ) | ||
|
|
||
| def get_edge_storage(self, feat_name, etype=None): | ||
| def get_edge_storage(self, key, etype=None, indices_offset=0): |
There was a problem hiding this comment.
Changed to key to match DGL.
There was a problem hiding this comment.
| self.storage_type = storage_type | ||
|
|
||
| self.from_dlpack = from_dlpack | ||
| self.indices_offset = indices_offset |
There was a problem hiding this comment.
Setting offset makes upstream code cleaner
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## branch-22.12 #2795 +/- ##
===============================================
Coverage ? 60.48%
===============================================
Files ? 111
Lines ? 6526
Branches ? 0
===============================================
Hits ? 3947
Misses ? 2579
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@gpucibot rerun tests |
rlratzel
left a comment
There was a problem hiding this comment.
Mostly minor things: some questions, suggestions, typos, etc.
Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com>
Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com>
Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com>
Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com>
Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com>
Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com>
|
@gpucibot merge |
|
@gpucibot merge |
|
@gpucibot merge |
… (#2795) This PR adds support for dict in feat_name for add_edge_data and add_node_data. - [x] Code Cleanup and ensure it lines with DGL - [x] Add tests - [x] Fix a `get_feature_storage` bug when device is set Authors: - Vibhu Jawa (https://github.com/VibhuJawa) Approvers: - Rick Ratzel (https://github.com/rlratzel) URL: rapidsai/cugraph#2795
This PR adds support for dict in feat_name for add_edge_data and add_node_data.
get_feature_storagebug when device is set