Hello.
I am pretty new to Julia and attempting to replicate a tutorial for InferOpt.jl (Tutorial in question is linked here: https://axelparmentier.github.io/InferOpt.jl/dev/tutorial/).
I have already installed the appropriate packages for using Julia in a Jupyter Notebook and began testing it out, everything seems to have gone well, but then I encountered a problem: using Types from Graphs.jl and GridGraphs.jl always gives me an error:
UndefVarError: AbstractGridGraph not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base .\Base.jl:31
[2] top-level scope
@ In[26]:4
[3] eval
@ .\boot.jl:368 [inlined]
[4] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1428
These are the cells I have ran, in order:
using Pkg; Pkg.add(["Flux", "Graphs", "GridGraphs", "InferOpt", "LinearAlgebra",
"ProgressMeter", "Random", "Statistics", "Test", "UnicodePlots"])
using Flux
using Graphs
using InferOpt
using LinearAlgebra
using ProgressMeter
using Random
using Statistics
using Test
using UnicodePlots
using GridGraphs
Random.seed!(63);
h, w = 50, 100
g = AcyclicGridGraph(rand(h, w));
The error shows up after the third cell is ran. I have also attempted to run the code above in VS Code and received the same error. Nonetheless, when I run something like the following code:
nb_features = 5
true_encoder = Chain(Dense(nb_features, 1), z -> dropdims(z; dims=1));
I receive absolutely no errors.
The following seemed to work for others when asked, but doesn't seem to work for me either:
h = 12
w = 15
T = Int32
R = Float32
weights_matrix = rand(R, h, w)
g = GridGraph{T}(weights_matrix)
This is my Pkg.status():
[587475ba] Flux v0.13.6
[86223c79] Graphs v1.7.4
[dd2b58c7] GridGraphs v0.8.0
[7073ff75] IJulia v1.23.3
[4846b161] InferOpt v0.3.1
[92933f4c] ProgressMeter v1.7.2
[b8865327] UnicodePlots v3.1.3
[37e2e46d] LinearAlgebra
[9a3f8284] Random
[10745b16] Statistics
[8dfed614] Test