Skip to content

Commit

Permalink
Merge branch 'develop' into select_class_models
Browse files Browse the repository at this point in the history
  • Loading branch information
dilpath authored Jan 9, 2025
2 parents 6a1da19 + e9a969e commit fce86f1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions pypesto/hierarchical/relative/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ def apply_inner_parameters_to_rdatas(
"""
sim = [rdata["y"] for rdata in rdatas]
sigma = [rdata["sigmay"] for rdata in rdatas]
inner_parameters = copy.deepcopy(inner_parameters)
inner_parameters = scale_back_value_dict(inner_parameters, problem)

# apply offsets, scalings and sigmas
for x in problem.get_xs_for_type(InnerParameterType.SCALING):
Expand Down
7 changes: 5 additions & 2 deletions pypesto/optimize/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def get_default_options(self):


class IpoptOptimizer(Optimizer):
"""Use IpOpt (https://pypi.org/project/ipopt/) for optimization."""
"""Use Ipopt (https://pypi.org/project/cyipopt/) for optimization."""

def __init__(self, options: dict = None):
"""
Expand All @@ -560,6 +560,9 @@ def __init__(self, options: dict = None):
options:
Options are directly passed on to `cyipopt.minimize_ipopt`, except
for the `approx_grad` option, which is handled separately.
For a list of available options, see the Ipopt documentation
(https://coin-or.github.io/Ipopt/OPTIONS.html).
"""
super().__init__()
self.approx_grad = False
Expand Down Expand Up @@ -599,7 +602,7 @@ def minimize(
jac = objective.get_grad
else:
raise ValueError(
"For IPOPT, the objective must either be able to return "
"For Ipopt, the objective must either be able to return "
"gradients or the `approx_grad` must be set to True."
)

Expand Down
1 change: 1 addition & 0 deletions pypesto/store/read_from_hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def read(self, objective: ObjectiveBase = None) -> Problem:
problem.x_fixed_vals = [float(val) for val in problem.x_fixed_vals]
problem.x_fixed_indices = [int(ix) for ix in problem.x_fixed_indices]
problem.x_names = [name.decode() for name in problem.x_names]
problem.x_scales = [scale.decode() for scale in problem.x_scales]

return problem

Expand Down
2 changes: 2 additions & 0 deletions test/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def obj_for_sensi(fun, grad, hess, max_sensi_order, integrated, x):
ret: dict
With fields obj, max_sensi_order, x, fval, grad, hess.
"""
x = np.asarray(x)

if integrated:
if max_sensi_order == 2:

Expand Down

0 comments on commit fce86f1

Please sign in to comment.