Conversation
…ms (#1) * Add KNITRO solver to the list of available solvers * Add KNITRO QP and Conic solver interfaces * Add KNITRO citation to the citation dictionary * Add KNITRO QP and Conic solver interface implementation * Add KNITRO to doc * Add KNITRO to ci for optional solvers
|
Hello, you can reach out to me cvxpydevs@gmail.com with info on us getting a license for CI. |
|
@PTNobel thanks. |
|
I added the license under the "KNITRO_LICENSE" secret. Unfortunately secrets can't be accessed in MRs. |
|
Thanks @SteveDiamond. Let me then rename the secret to |
|
I noticed that KNITRO wasn't installed in the test_optional_solvers jobs. I assume this is because the secret KNITRO_LICENSE is not accessible from pull requests. Do you need me to do anything about that? P.S.: On macOS, KNITRO is only supported on the ARM architecture, which is not the default configuration tested in your CI. Would it be possible to add this OS configuration to your CI setup? |
I think the secret licenses are only accessible when the pull request gets merged to master, but I am not entirely sure. I suppose it should be similar to how we deal with the MOSEK license.
Yes! I definitely think we should add that. Maybe having an extra entry for |
|
Benchmarks that have stayed the same: |
Transurgeon
left a comment
There was a problem hiding this comment.
thanks for making this PR @eminyouskn , I left a few comments/questions above. Other than that the interface is looking pretty good!
I had a related question for you: we are currently working on adding a new IPOPT interface for NLPs and I was wondering if the KNITRO NLP interface was similar to IPOPT's? We would definitely like to support KNITRO at some point down the line!
|
Thanks @Transurgeon for your comments. I've addressed most of them. Let me know if there's anything else that needs attention. Regarding the NLP interface, I'm not familiar with the IPOPT implementation. However, if you'd like to add NLP support for KNITRO, we'd be happy to assist. KNITRO, for example, uses callbacks to handle general nonlinear functions. |
| solution = Solution(status, obj, primal_vars, dual_vars, attr) | ||
|
|
||
| # Free the Knitro context. | ||
| kn.KN_free(kc) |
There was a problem hiding this comment.
Since we're cacheing the context should we be freeing it here?
There was a problem hiding this comment.
I agree. However, we're not using the cache yet. I plan to add that in the future, but for now, I think it's safe to free the context here. By the way the same thing apply for the conic interface.
|
@eminyouskn I just merged the master cvxpy branch to your PR, which includes the new macos-14 ARM runners. Once this PR gets merged we should be able to see that it successfully tested the KNITRO solver (with the license). |
Thanks @Transurgeon for the PR. I tested it on my fork, and the tests pass for KNITRO. However, there's still an error related to SDPA. |
yeah that's fine, the error is definitely unrelated. |
Transurgeon
left a comment
There was a problem hiding this comment.
Okay, I think this PR is ready to merge. @PTNobel could you have a sanity check please?
PTNobel
left a comment
There was a problem hiding this comment.
Coursery read looks fine
Description
This PR adds support for the KNITRO solver.
To run the tests in CI, the
KNITRO_CIenvironment variable needs to be set. Artelys can provide a license for this purpose, but I’m not sure whom to contact to arrange that.Type of change
Contribution checklist