Skip to content

Commit

Permalink
fix more test error
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxd3 committed Oct 31, 2024
1 parent 027cd31 commit 30dca23
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/abstractmcmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ using Statistics: mean
@test θ == t.z.θ
new_state = AbstractMCMC.setparams!!(model, s, θ)
@test new_state.transition.z.θ == θ
@test new_state.transition.z.ℓπ == s.transition.z.ℓπ
@test new_state.transition.z.ℓκ == s.transition.z.ℓκ
new_state_logπ = new_state.transition.z.ℓπ
@test new_state_logπ.value == s.transition.z.ℓπ.value
@test new_state_logπ.gradient == s.transition.z.ℓπ.gradient
new_state_logκ = new_state.transition.z.ℓκ
@test new_state_logκ.value == s.transition.z.ℓκ.value
@test new_state_logκ.gradient == s.transition.z.ℓκ.gradient
@test new_state.transition.z.r == s.transition.z.r

new_θ = randn(rng, 2)
new_state = AbstractMCMC.setparams!!(model, s, new_θ)
@test AbstractMCMC.getparams(new_state) == new_θ
Expand Down

0 comments on commit 30dca23

Please sign in to comment.