Skip to content

__solve interface support #1007

@ErikQQY

Description

@ErikQQY

Some of the subpackages in Optimization.jl do not support interfaces like SciMLBase.__solve(prob::OptimizationProblem, alg, args...; kwargs...), while others do. For example, SciMLBase has some traits for solvers that support the cache interface:

https://github.com/SciML/SciMLBase.jl/blob/6f1a1d077182cde28e951417484b17b6b771252f/src/solve.jl#L128-L139

We usually define

function __solve(prob, alg, args...; kwargs)
    cache = __init(prob, alg)
    sol = solve!(cache) # or solve!(integrator)
end

for some specific problem solvers (ODE, SDE, or BVP), but it seems the __solve is directly defined on OptimizationCache in Optimization.jl, while we are also doing similar init and solve cache things in Optimization.jl under the hood, why not use the same interface in Optimization.jl too?

Keep track of this issue from SciML/BoundaryValueDiffEq.jl#350 for better integration of Optimization.jl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions