Closed blegat closed 6 months ago
Merging #1052 (1d64631) into master (760993c) will decrease coverage by
0.32%
. The diff coverage is71.05%
.:exclamation: Current head 1d64631 differs from pull request most recent head e4e17d3. Consider uploading reports for the commit e4e17d3 to get more accurate results
@@ Coverage Diff @@
## master #1052 +/- ##
==========================================
- Coverage 84.94% 84.62% -0.32%
==========================================
Files 44 44
Lines 3427 3422 -5
==========================================
- Hits 2911 2896 -15
- Misses 516 526 +10
Files | Coverage Δ | |
---|---|---|
src/MOI_wrapper.jl | 74.27% <71.05%> (-4.06%) |
:arrow_down: |
lgtm
Should be ready from my side as well
@pkofod bump
I'll review it, thanks
Okay, fairly small change compared to the original. LGTM
This PR did not appropriately update the compat in Project.toml: https://github.com/JuliaNLSolvers/Optim.jl/pull/1060
@blegat, is there a way this can support both the old and the new interface?
It's not too hard, what's the motivation ?
Legacy code may not yet be updated to the new NLP interface.
Now that I think of it, I think it would be ok if there was one version that worked with the old NLP interface and another version that only supported the new one.
When I tried to use the old NLP interface with the current tagged release of Optim it did not seem to work for me.
Yes, the addition of the old NLP was merged a few months ago so after the latest release. I thought that since it's a new feature there is no need to maintain support for the old interface
Ya I agree no need to maintain support for the old interface, but can we make sure there is a release where the old interface works?
The issue is that v1 has already been tagged so if we release a version with the old interface and then remove it, it's a breaking change and we need v2
Good point. I was very confused when I made my first comment on this. I thought that in a previously release this package had been working with the legacy NL interface, but that is not the case.
I 100% agree going for the new NL interface, folks should be targeting that for new code development.
JuMP v1.15 now supports providing the nonlinear objective and constraints with
@objective
and@constraint
. The old syntax@NLobjective
and@NLconstraint
is kept for backward compatibility only. Since the MOI wrapper in Optim is new, we don't need to support the old interface so this PR replace it the new one which works with@objective
and@constraint
.