Skip to content

GNNGraph constructor is type unstable #593

@oxinabox

Description

@oxinabox

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 CellBauhaus/DLkitty#13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions