Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymoss committed Sep 22, 2023
1 parent 62c889f commit 57f0dc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gpjax/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def evaluate(self, model: LinearModel, train_data: gpx.Dataset) -> float:

# Initialise solver state.
solver.fun = _wrap_objective(solver.fun)
solver.options.pop("maxiter", None) # allow __post_init__ without jaxopt error
if hasattr(solver, "options"): # allow __post_init__ without weird jaxopt error
solver.options.pop("maxiter", None)
solver.__post_init__() # needed to propagate changes to `fun` attribute

if isinstance(solver, OptaxSolver): # hack for Optax compatibility
Expand Down

0 comments on commit 57f0dc3

Please sign in to comment.