Skip to content

Commit

Permalink
fixed?
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymoss committed Sep 26, 2023
1 parent 4fae37e commit 0a09d61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gpjax/decision_making/posterior_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def _optimize_posterior(

# # We create a new solver state -> since the dataset (and therefore loss function) has changed!
attributes = asdict(self.solver)
attributes["options"].pop("maxiter", None) # allow reinit without jaxopt error
if hasattr(attributes, "options"): # allow reinit without jaxopt error
attributes["options"].pop("maxiter", None)
attributes.pop("fun", None) # pass in fun as callable rather than dict
new_solver = self.solver.__class__(fun=self.solver.fun, **attributes)

Expand Down

0 comments on commit 0a09d61

Please sign in to comment.