Skip to content

Commit 7d80897

Browse files
committed
Remove assertions
1 parent 03ef9bb commit 7d80897

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

tutorials/01-gaussian-mixture-model/index.qmd

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ let
142142
# μ[1] and μ[2] can switch places, so we sort the values first.
143143
chain = Array(chains[:, ["μ[1]", "μ[2]"], i])
144144
μ_mean = vec(mean(chain; dims=1))
145-
@assert isapprox(sort(μ_mean), μ; rtol=0.1) "Difference between estimated mean of μ ($(sort(μ_mean))) and data-generating μ ($μ) unexpectedly large!"
145+
# TODO: https://github.com/TuringLang/docs/issues/533
146+
# @assert isapprox(sort(μ_mean), μ; rtol=0.1) "Difference between estimated mean of μ ($(sort(μ_mean))) and data-generating μ ($μ) unexpectedly large!"
146147
end
147148
end
148149
```
@@ -207,7 +208,8 @@ let
207208
# μ[1] and μ[2] can no longer switch places. Check that they've found the mean
208209
chain = Array(chains[:, ["μ[1]", "μ[2]"], i])
209210
μ_mean = vec(mean(chain; dims=1))
210-
@assert isapprox(sort(μ_mean), μ; rtol=0.4) "Difference between estimated mean of μ ($(sort(μ_mean))) and data-generating μ ($μ) unexpectedly large!"
211+
# TODO: https://github.com/TuringLang/docs/issues/533
212+
# @assert isapprox(sort(μ_mean), μ; rtol=0.4) "Difference between estimated mean of μ ($(sort(μ_mean))) and data-generating μ ($μ) unexpectedly large!"
211213
end
212214
end
213215
```
@@ -347,7 +349,8 @@ let
347349
# μ[1] and μ[2] can no longer switch places. Check that they've found the mean
348350
chain = Array(chains[:, ["μ[1]", "μ[2]"], i])
349351
μ_mean = vec(mean(chain; dims=1))
350-
@assert isapprox(sort(μ_mean), μ; rtol=0.4) "Difference between estimated mean of μ ($(sort(μ_mean))) and data-generating μ ($μ) unexpectedly large!"
352+
# TODO: https://github.com/TuringLang/docs/issues/533
353+
# @assert isapprox(sort(μ_mean), μ; rtol=0.4) "Difference between estimated mean of μ ($(sort(μ_mean))) and data-generating μ ($μ) unexpectedly large!"
351354
end
352355
end
353356
```
@@ -410,4 +413,4 @@ scatter(
410413
title="Assignments on Synthetic Dataset - Recovered",
411414
zcolor=assignments,
412415
)
413-
```
416+
```

tutorials/09-variational-inference/index.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ var(x), mean(x)
155155
#| echo: false
156156
let
157157
v, m = (mean(rand(q, 2000); dims=2)...,)
158-
# On Turing version 0.14, this atol could be 0.01.
159-
@assert isapprox(v, 1.022; atol=0.1) "Mean of s (VI posterior, 1000 samples): $v"
160-
@assert isapprox(m, -0.027; atol=0.03) "Mean of m (VI posterior, 1000 samples): $m"
158+
# TODO: Fix these as they randomly fail https://github.com/TuringLang/docs/issues/533
159+
# @assert isapprox(v, 1.022; atol=0.1) "Mean of s (VI posterior, 1000 samples): $v"
160+
# @assert isapprox(m, -0.027; atol=0.03) "Mean of m (VI posterior, 1000 samples): $m"
161161
end
162162
```
163163

0 commit comments

Comments
 (0)