sisl/NeuralVerification.jl

Storing things in model[:network] instead of model.ext[:network]

chelseas opened this issue · 1 comments

See this issue: jump-dev/JuMP.jl#2828

odow commented

Ah so the problem is here:

model[:network] = problem.network
model[:input] = problem.input
model[:output] = problem.output

You either need to store it in model.ext[:network] and implement
https://github.com/jump-dev/JuMP.jl/blob/59752794521b8c5eddfd5a57c595bb096a4a56b2/src/copy.jl#L6-L29
or you need to implement getindex for
https://github.com/jump-dev/JuMP.jl/blob/59752794521b8c5eddfd5a57c595bb096a4a56b2/src/copy.jl#L31-L45

Or you can just accept the warnings when copy_model is used. JuMP can't do much else, because it doesn't know the type of things you are storing there.

I should add a section on copying to the documentation:
https://jump.dev/JuMP.jl/stable/developers/extensions/#The-extension-dictionary