Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pasq-cat committed Oct 15, 2024
1 parent 263cc67 commit 453b49f
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions src/direct_mlj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,20 @@ function MMI.update(m::Laplace_Models, verbosity, old_fitresult, old_cache, X, y

fitresult = (la, y[1])
report = (loss_history=old_loss_history,)
cache = (deepcopy(m), old_state_tree, old_loss_history)
cache = old_cache

else
nothing
fitresult = old_fitresult
report = (loss_history=old_loss_history,)
cache = (deepcopy(m), old_state_tree, old_loss_history)
end
end




if MMI.is_same_except(
return fitresult, cache, report

elseif MMI.is_same_except(
m,
old_model,
:fit_prior_nsteps,
Expand Down Expand Up @@ -282,9 +288,23 @@ function MMI.update(m::Laplace_Models, verbosity, old_fitresult, old_cache, X, y
fitresult = la
report = (loss_history=old_loss_history,)
cache = (deepcopy(m), old_state_tree, old_loss_history)

return fitresult, cache, report



else

fitresult, cache, report = MMI.fit(m, verbosity, X, y)

Check warning on line 298 in src/direct_mlj.jl

View check run for this annotation

Codecov / codecov/patch

src/direct_mlj.jl#L298

Added line #L298 was not covered by tests


return fitresult, cache, report

Check warning on line 301 in src/direct_mlj.jl

View check run for this annotation

Codecov / codecov/patch

src/direct_mlj.jl#L301

Added line #L301 was not covered by tests




end

return fitresult, cache, report
end

@doc """
Expand Down

0 comments on commit 453b49f

Please sign in to comment.