Skip to content

Commit

Permalink
Update src/solve.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Vaibhav Kumar Dixit <[email protected]>
  • Loading branch information
ParasPuneetSingh and Vaibhavdixit02 authored Apr 9, 2024
1 parent 499ad94 commit faf258d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function _check_opt_alg(prob::OptimizationProblem, alg; kwargs...)
!allowscallback(alg) && haskey(kwargs, :callback) &&
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) does not support callbacks, remove the `callback` keyword argument from the `solve` call."))
!requiresgradient(alg) && !(prob.f::OptimizationFunction) &&

Check warning on line 119 in src/solve.jl

View check run for this annotation

Codecov / codecov/patch

src/solve.jl#L119

Added line #L119 was not covered by tests
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) requires gradients, pass them in `OptimizationFunction`."))
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) requires gradients, hence use `OptimizationFunction` to generate them with an automatic differentiation backend e.g. `OptimizationFunction(f, AutoForwardDiff())` or pass it in with `grad` kwarg."))
!requireshessian(alg) && !(prob.f::OptimizationFunction) &&

Check warning on line 121 in src/solve.jl

View check run for this annotation

Codecov / codecov/patch

src/solve.jl#L121

Added line #L121 was not covered by tests
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) requires hessians, pass them in `OptimizationFunction`."))
!requiresconsjac(alg) && !(prob.f::OptimizationFunction) &&

Check warning on line 123 in src/solve.jl

View check run for this annotation

Codecov / codecov/patch

src/solve.jl#L123

Added line #L123 was not covered by tests
Expand Down

0 comments on commit faf258d

Please sign in to comment.