-
Notifications
You must be signed in to change notification settings - Fork 6
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
[feature] wrapping cost function to return best value explored #33
Merged
VolodyaCO
merged 25 commits into
main
from
fix/#29/wrap-cost-function-to-return-best-val-scipy-opt
Jun 2, 2023
Merged
Changes from 9 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8d8cf99
[feature] wrapping cost function to return best value explored
VolodyaCO ff18230
[fix] complying with minimize signature
VolodyaCO 4ce8bd7
[feature] saving best value and params only if params are bounded and…
VolodyaCO 0a5ce54
Merge branch 'main' into fix/#29/wrap-cost-function-to-return-best-va…
VolodyaCO 29fa0a3
[fix] correct way of checking bounds
VolodyaCO 03e016f
[test] testing edge case of the langermann function
VolodyaCO 0bb0216
[fix] fixes test
VolodyaCO a7bfb2b
[fix] inequality constraint fails if function is less than 0 only
VolodyaCO 7026892
[style] length of comment
VolodyaCO c2311d0
[feature] expose argument to control if best parameters are stored
VolodyaCO 3c84347
[feature] typing
VolodyaCO fa7da9b
[feature] wrapping cost function to return best value explored
VolodyaCO 718322c
[fix] complying with minimize signature
VolodyaCO b015210
[feature] saving best value and params only if params are bounded and…
VolodyaCO f0afb09
[fix] correct way of checking bounds
VolodyaCO a4ff2a7
[test] testing edge case of the langermann function
VolodyaCO f17b02d
[fix] fixes test
VolodyaCO de20411
[fix] inequality constraint fails if function is less than 0 only
VolodyaCO e46d423
[style] length of comment
VolodyaCO c878851
[feature] expose argument to control if best parameters are stored
VolodyaCO 9818a7a
[feature] typing
VolodyaCO 3ee4bad
[test] asserting that the opt value is the minimum of the history
VolodyaCO 3905209
Merge branch 'fix/#29/wrap-cost-function-to-return-best-val-scipy-opt…
VolodyaCO 8192721
[style] mypy corrections
VolodyaCO 6e6a611
[fix] seeding ttopt
VolodyaCO File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a nice little piece of code! But I'm afraid it might be needlessly opaque since isinstance is only used once here and just for an assert statement. metaclasses are considered "heavy machinery" so it's best not to use them when they could be replaced with a simple if statement.
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.
If I remove this to check the new instance check, I get some linting problems 😢
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.
Yes, but since you only use this isinstance once, it's not really worth changing the instancecheck method right?
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 had to do this trick for the tensor train optimiser PR too #31. Do you want me to instead have a custom
isinstanceCostFunctionWithBestValue
function, or something like that?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.
No, it's probably fine. Not worth holding up the PR for this.