Skip to content

Commit

Permalink
scope is hard
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed Dec 9, 2024
1 parent e4d0089 commit c9c5fe2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/profile/profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ value of ζ exceeds `threshold`.
function profile(m::LinearMixedModel; threshold=4)
isfitted(m) || refit!(m)
final = copy(m.optsum.final)
try
profile = try
tc = TableColumns(m)
val = profileσ(m, tc; threshold) # FIXME: defer creating the splines until the whole table is constructed
objective!(m, final) # restore the parameter estimates
Expand All @@ -48,6 +48,7 @@ function profile(m::LinearMixedModel; threshold=4)
profileθj!(val, s, tc; threshold)
end
profileσs!(val, tc)
MixedModelProfile(m, Table(val.tbl), val.fwd, val.rev)
catch ex
@error "Exception occurred in profiling; aborting..."

Check warning on line 53 in src/profile/profile.jl

View check run for this annotation

Codecov / codecov/patch

src/profile/profile.jl#L53

Added line #L53 was not covered by tests
rethrow(ex)
Expand All @@ -57,7 +58,7 @@ function profile(m::LinearMixedModel; threshold=4)
m.optsum.fmin = objective(m)
m.optsum.sigma = nothing
end
return MixedModelProfile(m, Table(val.tbl), val.fwd, val.rev)
return profile
end

"""
Expand Down

0 comments on commit c9c5fe2

Please sign in to comment.