Skip to content
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
Merged
Changes from 1 commit
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 Jan 2, 2023
ff18230
[fix] complying with minimize signature
VolodyaCO Jan 2, 2023
4ce8bd7
[feature] saving best value and params only if params are bounded and…
VolodyaCO Jan 3, 2023
0a5ce54
Merge branch 'main' into fix/#29/wrap-cost-function-to-return-best-va…
VolodyaCO Jan 3, 2023
29fa0a3
[fix] correct way of checking bounds
VolodyaCO Jan 3, 2023
03e016f
[test] testing edge case of the langermann function
VolodyaCO Jan 3, 2023
0bb0216
[fix] fixes test
VolodyaCO Jan 3, 2023
a7bfb2b
[fix] inequality constraint fails if function is less than 0 only
VolodyaCO Jan 3, 2023
7026892
[style] length of comment
VolodyaCO Jan 3, 2023
c2311d0
[feature] expose argument to control if best parameters are stored
VolodyaCO Jan 16, 2023
3c84347
[feature] typing
VolodyaCO Jan 16, 2023
fa7da9b
[feature] wrapping cost function to return best value explored
VolodyaCO Jan 2, 2023
718322c
[fix] complying with minimize signature
VolodyaCO Jan 2, 2023
b015210
[feature] saving best value and params only if params are bounded and…
VolodyaCO Jan 3, 2023
f0afb09
[fix] correct way of checking bounds
VolodyaCO Jan 3, 2023
a4ff2a7
[test] testing edge case of the langermann function
VolodyaCO Jan 3, 2023
f17b02d
[fix] fixes test
VolodyaCO Jan 3, 2023
de20411
[fix] inequality constraint fails if function is less than 0 only
VolodyaCO Jan 3, 2023
e46d423
[style] length of comment
VolodyaCO Jan 3, 2023
c878851
[feature] expose argument to control if best parameters are stored
VolodyaCO Jan 16, 2023
9818a7a
[feature] typing
VolodyaCO Jan 16, 2023
3ee4bad
[test] asserting that the opt value is the minimum of the history
VolodyaCO Jun 2, 2023
3905209
Merge branch 'fix/#29/wrap-cost-function-to-return-best-val-scipy-opt…
VolodyaCO Jun 2, 2023
8192721
[style] mypy corrections
VolodyaCO Jun 2, 2023
6e6a611
[fix] seeding ttopt
VolodyaCO Jun 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[fix] complying with minimize signature
  • Loading branch information
VolodyaCO committed May 2, 2023
commit 718322c45ebd8e7ce2c01728125e2a86ff87313b
4 changes: 2 additions & 2 deletions src/orquestra/opt/optimizers/scipy_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _preprocess_cost_function(

def _minimize(
self,
cost_function: _CostFunctionWithBestValue,
cost_function: Union[CallableWithGradient, Callable],
initial_params: np.ndarray,
keep_history: bool = False,
):
Expand All @@ -90,7 +90,7 @@ def _minimize(
evaluations should be recorded.

"""

assert isinstance(cost_function, _CostFunctionWithBestValue)
AthenaCaesura marked this conversation as resolved.
Show resolved Hide resolved
jacobian = None
if isinstance(cost_function, CallableWithGradient) and callable(
getattr(cost_function, "gradient")
Expand Down