diff --git a/Project.toml b/Project.toml index fc1d394..7a845bc 100644 --- a/Project.toml +++ b/Project.toml @@ -11,7 +11,7 @@ Scratch = "6c6a2e73-6563-6170-7368-637461726353" [compat] DLPack = "0.3.0" -GNNGraphs = "1.3.1" +GNNGraphs = "1.4.1" PythonCall = "0.9.23" Scratch = "1.2.1" julia = "1.10" diff --git a/src/graph_conversion.jl b/src/graph_conversion.jl index fe3a87b..a1a17f7 100644 --- a/src/graph_conversion.jl +++ b/src/graph_conversion.jl @@ -141,10 +141,8 @@ function to_gnnheterograph(data) jt = to_edge_t(t) for k in data[t].keys() jk = Symbol(k) - @show jt jk jk == :edge_index && continue py_x = data[t][k] - @show pytype(py_x) x = try_from_dlpack(py_x) last_dim = size(x, ndims(x)) if last_dim != num_edges[jt] || jk == :edge_label_index diff --git a/test/datasets.jl b/test/datasets.jl index 981ad31..5a610e5 100644 --- a/test/datasets.jl +++ b/test/datasets.jl @@ -141,7 +141,15 @@ end @test length(src) == length(dst) == 4278 end -# @testitem "AMiner" setup=[TestModule] begin -# using .TestModule -# dataset = load_dataset("AMiner") -# end +@testitem "MovieLens100K" setup=[TestModule] begin + using .TestModule + dataset = load_dataset("MovieLens100K") + @test length(dataset) == 1 + g = dataset[1] + @test g.num_nodes == Dict(:user => 943, :movie => 1682) + @test g.num_edges == Dict((:movie, :rated_by, :user) => 80000, (:user, :rates, :movie) => 80000) + @test g.gdata.edge_label[(:user, :rates, :movie)] isa Vector{Float32} + @test length(g.gdata.edge_label[(:user, :rates, :movie)]) == 20000 + @test g.gdata.edge_label_index[(:user, :rates, :movie)] isa Matrix{Int} + @test size(g.gdata.edge_label_index[(:user, :rates, :movie)]) == (20000, 2) +end