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

GNNGraph constructor is type unstable #593

Open
oxinabox opened this issue Feb 24, 2025 · 1 comment
Open

GNNGraph constructor is type unstable #593

oxinabox opened this issue Feb 24, 2025 · 1 comment

Comments

@oxinabox
Copy link

It seems like the GNNGraph constructor switches between where it is backed by a dense or sparse matrix depending on sparsity.
This kinda type instability is consider not so bad because it is handled by the small unions optimization.

However, when you map over these the resulting collectio becomes a Vector{Any}.
Which does not benifit from small unions optimization.

And I think it is very normal to map over these, when constructing graphs for all your training data.

Noticed in CellBH/DLkitty#13

@CarloLucibello
Copy link
Member

this shouldn't happen. Could you provide an example?

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

No branches or pull requests

2 participants