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

Fix GlobalStorage.is_node_attr and GlobalStorage.is_edge_attr when passing tuples in cat_dim #9927

Merged
merged 3 commits into from
Jan 14, 2025

Conversation

erytheis
Copy link
Contributor

@erytheis erytheis commented Jan 9, 2025

The PR fixes the issue when calling is_node_attr and is_edge_attr for Data objects with sparse attributes that assume block-diagonal concatenation ( #9895 and in #8709). These cases raise an error due to cat_dim being a tuple, the change catches this case and looks at the 0-th dimension of the sparse tensor.

@erytheis erytheis requested a review from mananshah99 as a code owner January 9, 2025 13:49
@erytheis erytheis changed the title Fix GlobalStorage.is_node_attr and GlobalStorage.is_edge_attr when passing tuples in cat_dim (#9895) Fix GlobalStorage.is_node_attr and GlobalStorage.is_edge_attr when passing tuples in cat_dim Jan 9, 2025
@erytheis erytheis force-pushed the fix_is_node_attr_for_sparse branch from 596ecd9 to 7b714b2 Compare January 12, 2025 12:01
@rusty1s
Copy link
Member

rusty1s commented Jan 14, 2025

I would assume that if cat_dim is given as a tuple, it can never be a node or edge attribute. Shall we just return False in these cases?

@rusty1s rusty1s changed the title Fix GlobalStorage.is_node_attr and GlobalStorage.is_edge_attr when passing tuples in cat_dim Fix GlobalStorage.is_node_attr and GlobalStorage.is_edge_attr when passing tuples in cat_dim Jan 14, 2025
@rusty1s rusty1s merged commit f777156 into pyg-team:master Jan 14, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants