From 5426eca15c0ded6807c7e8043090cd140774b154 Mon Sep 17 00:00:00 2001 From: Markus Hauru Date: Wed, 30 Oct 2024 15:03:14 +0100 Subject: [PATCH] Fix the global Random.seed in runtests.jl (#2381) Co-authored-by: Penelope Yong --- test/runtests.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 1aa8bb635..d5561bb92 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,10 +1,14 @@ include("test_utils/SelectiveTests.jl") using .SelectiveTests: isincluded, parse_args using Pkg +using Random: seed! using Test using TimerOutputs: TimerOutputs, @timeit import Turing +# Fix the global Random.seed for reproducibility. +seed!(23) + include(pkgdir(Turing) * "/test/test_utils/models.jl") include(pkgdir(Turing) * "/test/test_utils/numerical_tests.jl") include(pkgdir(Turing) * "/test/test_utils/ad_utils.jl")