-
Notifications
You must be signed in to change notification settings - Fork 557
New KNITRO direct solver interface #3707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
611fb3b
to
0d7a162
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3707 +/- ##
==========================================
+ Coverage 89.31% 89.34% +0.02%
==========================================
Files 896 906 +10
Lines 103687 104444 +757
==========================================
+ Hits 92609 93314 +705
- Misses 11078 11130 +52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hi @eminyouskn - okay, so, the tests are running but a large number of them are failing. Here is part of the stacktrace:
Most of the failures are just tolerance problems / the tolerance needs to be loosened. |
One-off failures:
Second one-off:
|
Thanks @mrmundt for the report. I didn’t run these tests locally since I didn’t have NumPy installed, and in that case, the tests are skipped. I’ll make sure to check them before pushing code from now on. I do have a question: is there a way to adjust the tolerance for all these tests at once? Ideally, we’d only change it for Knitro, but I imagine that might be more complicated. Regarding the two remaining failures, I’ve already fixed the one related to the objective. However, I’m not sure how to address the stale one, it’s not clear to me what exactly that test is supposed to check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @eminyouskn , for this! I have a lot of comments to start us off. Happy to hear pushback!
@mrmundt Thanks for your comments. I’ve addressed the majority of them. For two of your comments, I left my original implementation and added my reasoning. If you feel my explanations are not convincing, I’m open to adjusting the code accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I swear, I am almost done leaving comments. This is looking great. I found one uncaught typo and have a couple of suggestions. Also, I noticed that you don't use a logger
anywhere. Not saying you have to, but you might consider doing so for any helpful messages / debugging for users' benefit?
Co-authored-by: Miranda Mundt <[email protected]>
Thanks @mrmundt for the quick and thorough review. As you mentioned, I didn’t use the logger, everything requiring user attention is either handled directly or raised an error, in which case the higher-level code is responsible for communicating it to the user. |
However, your point about debugging is valid. I need to consider whether there are parts that should be logged specifically for debugging purposes. |
@mrmundt One of the two failing tests doesn’t seem related to Knitro. For the other one, could you share the output so I can work on fixing it? |
Yup, this one should be an easy fix:
Just update |
Thanks @mrmundt for the report. I’d prefer not to change the test since it should pass as is. I believe I found the cause of the failure, so I’ll add a fix. |
Fixes NA
Summary/Motivation:
This PR introduced a new KNITRO direct solver interface.
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: