Skip to content

Commit 90a8862

Browse files
committed
use ForwardDiff for dppl_hmm_semisup
Closes #40
1 parent 0db6027 commit 90a8862

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,19 @@ elseif length(ARGS) == 3 && ARGS[1] == "--run"
143143
params = [-0.5, 0.5]
144144
result = run_ad(model, adtype; varinfo=vi, params=params, test=WithBackend(ADTYPES["FiniteDifferences"]), benchmark=true)
145145
else
146+
ref_backend = if model_name == "dppl_hmm_semisup"
147+
# FiniteDifferences errors on this model causing all models
148+
# to 'error'
149+
# https://github.com/TuringLang/ADTests/issues/40
150+
ADTYPES["ForwardDiff"]
151+
else
152+
ADTYPES["FiniteDifferences"]
153+
end
146154
result = run_ad(
147155
model,
148156
adtype;
149157
rng=Xoshiro(468),
150-
test=WithBackend(ADTYPES["FiniteDifferences"]),
158+
test=WithBackend(ref_backend),
151159
benchmark=true,
152160
)
153161
end

0 commit comments

Comments
 (0)