Skip to content

Commit adef802

Browse files
authored
Merge pull request #64 from TuringLang/py/42
bump version
2 parents e7f784f + 849def2 commit adef802

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
2929
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
3030

3131
[compat]
32-
DynamicPPL = "0.38"
33-
Turing = "0.41"
32+
DynamicPPL = "0.39"
33+
Turing = "0.42"

ad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def run_ad(args):
7979
results = {}
8080

8181
if model_key == "multithreaded":
82-
RUN_JULIA_COMMAND = ["julia", "--threads=2", *JULIA_COMMAND[1:]]
82+
RUN_JULIA_COMMAND = ["julia", "--threads=4", *JULIA_COMMAND[1:]]
8383
else:
8484
RUN_JULIA_COMMAND = JULIA_COMMAND
8585

models/multithreaded.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#=
2-
Most models in ADTests are run with 1 thread. This model is run with 2 threads
2+
Most models in ADTests are run with 1 thread. This model is run with 4 threads
33
to properly demonstrate the compatibility with multithreaded observe
4-
statements. See `main.jl` for more information.
4+
statements. See the docs for more details on multithreading in Turing:
5+
https://turinglang.org/docs/usage/threadsafe-evaluation/
56
=#
67

78
@model function multithreaded(x)
@@ -11,4 +12,5 @@ statements. See `main.jl` for more information.
1112
end
1213
end
1314

14-
model = multithreaded([1.5, 2.0, 2.5, 1.5, 2.0, 2.5])
15+
x = randn(100)
16+
model = setthreadsafe(multithreaded(x), true)

0 commit comments

Comments
 (0)