Giter Club home page Giter Club logo

Comments (5)

sethaxen avatar sethaxen commented on June 16, 2024

@ValentinKaisermayer I think this type-noninferrability may have been introduced in #406 . Is this something that can be fixed?

from optimization.jl.

Vaibhavdixit02 avatar Vaibhavdixit02 commented on June 16, 2024

@sethaxen thanks for the issue. I plan to prioritize this, have been stuck at getting the CI to pass on #553 hence the delay.

from optimization.jl.

Vaibhavdixit02 avatar Vaibhavdixit02 commented on June 16, 2024

We had an update to the caching after #406 in #536 also. Did you git bisect to find #406 as the point where it started showing up?

from optimization.jl.

sethaxen avatar sethaxen commented on June 16, 2024

git bisect starting with c67d630 as a good commit terminates with #406, but the above code fails then with a different error:

julia> @inferred solve(prob, optimizer)
ERROR: MethodError: Cannot `convert` an object of type Nothing to an object of type SciMLBase.AbstractOptimizationCache

Closest candidates are:
  convert(::Type{T}, ::T) where T
   @ Base Base.jl:64

Stacktrace:
 [1] init(::OptimizationProblem{true, OptimizationFunction{true, SciMLBase.NoAD, typeof(f), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, ::NelderMead{Optim.AffineSimplexer, Optim.AdaptiveParameters}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ SciMLBase ~/.julia/packages/SciMLBase/s9wrq/src/solve.jl:149
 [2] init(::OptimizationProblem{true, OptimizationFunction{true, SciMLBase.NoAD, typeof(f), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, ::NelderMead{Optim.AffineSimplexer, Optim.AdaptiveParameters})
   @ SciMLBase ~/.julia/packages/SciMLBase/s9wrq/src/solve.jl:146
 [3] solve(::OptimizationProblem{true, OptimizationFunction{true, SciMLBase.NoAD, typeof(f), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, ::NelderMead{Optim.AffineSimplexer, Optim.AdaptiveParameters}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ SciMLBase ~/.julia/packages/SciMLBase/s9wrq/src/solve.jl:83
 [4] solve(::OptimizationProblem{true, OptimizationFunction{true, SciMLBase.NoAD, typeof(f), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, ::NelderMead{Optim.AffineSimplexer, Optim.AdaptiveParameters})
   @ SciMLBase ~/.julia/packages/SciMLBase/s9wrq/src/solve.jl:80
 [5] top-level scope
   @ REPL[8]:1

from optimization.jl.

Vaibhavdixit02 avatar Vaibhavdixit02 commented on June 16, 2024

I made some attempts on this but haven't been successful yet. The parametric types in OptimizationSolution for some fields are not inferred which doesn't make sense immediately.

from optimization.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.