corail-research / SeaPearlZoo.jl

SeaPearl's pool of examples
BSD 3-Clause "New" or "Revised" License
21 stars 0 forks source link

MethodError: no method matching (::GraphConv{GraphSignals.NullGraph, Matrix{Float32}, Vector{Float32}})(::SeaPearl.BatchedFeaturedGraph{Float32}) #20

Open chritkhalil opened 2 years ago

chritkhalil commented 2 years ago

Hello, I've been trying to run models on the SeaPearlZoo, followed the documentation but I get this error:

LoadError: MethodError: no method matching (::GraphConv{GraphSignals.NullGraph, Matrix{Float32}, Vector{Float32}})(::SeaPearl.BatchedFeaturedGraph{Float32})
Closest candidates are:
  (::AbstractGraphLayer)(::AbstractMatrix) at /Users/pro/.julia/packages/GeometricFlux/9uhzk/src/layers/graphlayers.jl:3
  (::GraphConv)(::GraphSignals.FeaturedGraph) at /Users/pro/.julia/packages/GeometricFlux/9uhzk/src/layers/conv.jl:174
  (::GraphConv)(::GraphSignals.FeaturedGraph, ::AbstractMatrix) at /Users/pro/.julia/packages/GeometricFlux/9uhzk/src/layers/conv.jl:168

I tracked down the issue to a type mismatch in Flux, but I can't fix it yet

3rdCore commented 2 years ago

Hello,

FIrst, thanks for your interest in SeaPearl, It's always a pleasure to see new person having an interest in our Reinforcement Learning-based solver.

Which problem were you trying to run?

You problem is due to the fact that the official version of SeaPearl provided by Julia package manager is no longer up-to-date with the actual version of SeaPearl. For the moment we need to manually inform the Julia Registrator to update their version fo SeaPearl. I will try to automate this asap.

One fast fix can be to use a local version of the package SeaPearl, for that, you first need to git clone the project to your computer and then add the previously downloaded local package SeaPearl as a dev package.

Please visit this website for more information about that.

3rdCore commented 2 years ago

For example, I activated the project _SeaPearlZoo/learningcp/tsptw, the command ] status shows all the added packages. Here you can see that both packages SeaPearl and SeaPearlExtra are local versions.

(tsptw) pkg> status
      Status `C:\Users\Tom\Nextcloud\Corail Research\SeaPearl\SeaPearlZoo\learning_cp\tsptw\Project.toml`
→ [c7e460c6] ArgParse v1.1.4
  [fbb218c0] BSON v0.3.4
→ [336ed68f] CSV v0.9.11
→ [a93c6f00] DataFrames v1.3.1
→ [587475ba] Flux v0.12.8
→ [7e08b658] GeometricFlux v0.8.0
  [682c06a0] JSON v0.21.2
→ [91a5bcdd] Plots v1.25.6
  [158674fc] ReinforcementLearning v0.10.0
→ [de1b191a] ReinforcementLearningCore v0.8.8
→ [295af30f] Revise v3.3.1
  [c13076dc] SeaPearl v0.4.0 `..\..\..\SeaPearl.jl`
→ [90978a9a] SeaPearlExtras v0.1.0 `../../../SeaPearlExtras.jl#feature/ggplots`
→ [e88e6eb3] Zygote v0.6.33
        Info packages marked with → not downloaded, use `instantiate` to download
jardinetsouffleton commented 2 years ago

Hi @chritkhalil! I reckon I'm a little late at the party, but this: https://github.com/corail-research/SeaPearl.jl/issues/275 should fix the issue you ran into. A new version of SeaPearl was published last week and all the latest features are there. Let me know if this solves your issue!