Graph examples are not working
kaansancak opened this issue · 2 comments
Hi,
I have been trying to run some examples of GeometricFlux. I have initially created FluxML/GeometricFlux.jl#344, but owners redirected me to here since the error comes from MLDatasets.
I am getting the following error:
[ Info: Training on GPU
ERROR: LoadError: MethodError: no method matching getindex(::Cora, ::Int64)
Stacktrace:
[1] load_data(dataset::Cora, batch_size::Int64, train_repeats::Int64, test_repeats::Int64) (repeats 2 times)
@ Main /workspace/Julia/graphconv.jl:16
[2] train(; kws::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Main /workspace/Julia/graphconv.jl:73
[3] train()
@ Main /workspace/Julia/graphconv.jl:57
[4] top-level scope
@ /workspace/Julia/graphconv.jl:116
in expression starting at /workspace/Julia/graphconv.jl:116
These are my dependencies:
[052768ef] CUDA v3.12.0
[587475ba] Flux v0.13.6
⌃ [7e08b658] GeometricFlux v0.13.4
[3ebe565e] GraphSignals v0.7.3
⌃ [86223c79] Graphs v1.7.3
[eb30cadb] MLDatasets v0.7.4
[d96e819e] Parameters v0.12.3
[92933f4c] ProgressMeter v1.7.2
[10745b16] Statistics
Hey, thanks for reporting this issue! We need some additional information for understanding the issue.
It would be helpful if you can you confirm the output of these two snippets.
julia> using GeometricFlux.Datasets
julia> dataset = Cora()
dataset Cora:
metadata => Dict{String, Any} with 3 entries
graphs => 1-element Vector{MLDatasets.Graph}
julia> dataset[1]
Graph:
num_nodes => 2708
num_edges => 10556
edge_index => ("10556-element Vector{Int64}", "10556-element Vector{Int64}")
node_data => (features = "1433×2708 Matrix{Float32}", targets = "2708-element Vector{Int64}", train_mask = "140-trues BitVector", val_mask = "500-trues BitVector", test_mask = "1000-trues BitVector")
edge_data => nothing
julia> @which Cora()
Cora(; dir, reverse_edges) in MLDatasets at /home/deebyo/.julia/packages/MLDatasets/eZ0Va/src/datasets/graphs/cora.jl:57
now, Close julia repl and start and new repl for the next one (just to maintain sanity).
julia> using MLDatasets
julia> dataset = Cora()
dataset Cora:
metadata => Dict{String, Any} with 3 entries
graphs => 1-element Vector{MLDatasets.Graph}
julia> dataset[1]
Graph:
num_nodes => 2708
num_edges => 10556
edge_index => ("10556-element Vector{Int64}", "10556-element Vector{Int64}")
node_data => (features = "1433×2708 Matrix{Float32}", targets = "2708-element Vector{Int64}", train_mask = "140-trues BitVector", val_mask = "500-trues BitVector", test_mask = "1000-trues BitVector")
edge_data => nothing
julia> @which Cora()
Cora(; dir, reverse_edges) in MLDatasets at /home/deebyo/.julia/packages/MLDatasets/eZ0Va/src/datasets/graphs/cora.jl:57
Also provide a the Project.toml of the environment if possible.
Looks like this issue is not related to MLDatasets.jl, so closing this for now. Lets use the original issue in GeometricFlux.jl for tracking this bug.