FluxML / GeometricFlux.jl

Geometric Deep Learning for Flux
https://fluxml.ai/GeometricFlux.jl/stable/
MIT License
348 stars 30 forks source link

Compatibility with `GraphSignals.jl` Check #263

Closed axla-io closed 2 years ago

axla-io commented 2 years ago

Hi @yuehhua ! The change of check_num_node to check_num_nodes in GraphSignals.jl breaks the code for evaluating a graph model based on a feature graph.

MWE

using Flux
using GraphSignals
using GeometricFlux
using LinearAlgebra
using LightGraphs.SimpleGraphs

# Initialize variables
num_node = 3
num_features = 2
hidden = 16

# Preprocess data
train_X = Matrix{Float32}(rand(num_features, num_node))

# Create featured graph
adj = [1 1 0;
        1 1 1;
        0 1 1]
fg = FeaturedGraph(adj)

# Define GCN model
model = Chain(GCNConv(fg, num_features=>hidden, relu),
              GCNConv(fg, hidden=>num_features),
              )

print(model(train_X))

Error message

Running this code gives the error message:

ERROR: LoadError: UndefVarError: check_num_node not defined

NB that instead of using Graphs.SimpleGraphs I use using LightGraphs.SimpleGraphs as there is some compatibility issues, see my reply in #262

yuehhua commented 2 years ago

OK, it's my miss. Thank you for reporting this.

yuehhua commented 2 years ago

@axla-code Would you please mention your GeometricFlux and GraphSignals version?

axla-io commented 2 years ago

Hi @yuehhua I realized that I had the same problem as @arnaudmgh in #262 Updating Julia from 1.5 to 1.7 solves the issue.

yuehhua commented 2 years ago

Updating Julia from 1.5 to 1.7 solves the issue.

Issue resolved.