JuliaSmoothOptimizers / ADNLPModels.jl

Other
29 stars 12 forks source link

Add SparseDiffTools jacobian #105

Closed tmigot closed 1 year ago

tmigot commented 1 year ago

13

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 96.15% and project coverage change: -0.07 :warning:

Comparison is base (f805c74) 98.50% compared to head (b53875f) 98.44%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #105 +/- ## ========================================== - Coverage 98.50% 98.44% -0.07% ========================================== Files 8 8 Lines 938 964 +26 ========================================== + Hits 924 949 +25 - Misses 14 15 +1 ``` | [Impacted Files](https://codecov.io/gh/JuliaSmoothOptimizers/ADNLPModels.jl/pull/105?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers) | Coverage Δ | | |---|---|---| | [src/ADNLPModels.jl](https://codecov.io/gh/JuliaSmoothOptimizers/ADNLPModels.jl/pull/105?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQTW9kZWxzLmps) | `97.05% <0.00%> (-2.95%)` | :arrow_down: | | [src/ad.jl](https://codecov.io/gh/JuliaSmoothOptimizers/ADNLPModels.jl/pull/105?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL2FkLmps) | `97.46% <ø> (ø)` | | | [src/sparse\_derivatives.jl](https://codecov.io/gh/JuliaSmoothOptimizers/ADNLPModels.jl/pull/105?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL3NwYXJzZV9kZXJpdmF0aXZlcy5qbA==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

tmigot commented 1 year ago

@amontoison I am finally ready with this! I think it will not be hard to do the same for the Hessian, later.

dpo commented 1 year ago

Awesome!!! Would you mind adding a couple of unit tests? They serve as documentation too.

tmigot commented 1 year ago

Tangi, why do you call this backend SparseForwardADJacobian? We can decide if we want to determine the Jacobian by rows or columns.

matrix_colors(A,alg; partition_by_rows)

Because it uses a forward-mode autodiff to compute the values.

That's right, I can add these options in the backend constructor, thanks for the suggestion.

tmigot commented 1 year ago

Hey @amontoison ! I added the algorithm in kwargs and tests. However, no clue how to make the partition_by_rows work, so I created an issue in SparseDiffTools. So, I guess it is for later :).

github-actions[bot] commented 1 year ago
Package name latest stable
CaNNOLeS.jl
DCISolver.jl
DerivativeFreeSolvers.jl
JSOSolvers.jl
NLPModelsIpopt.jl
OptimizationProblems.jl
Percival.jl
QuadraticModels.jl
SolverBenchmark.jl
SolverTools.jl
tmigot commented 1 year ago

Thanks @amontoison for the improvements!