From fc278d22d8ae2f26b4f508a7a0c5f23b330f03ee Mon Sep 17 00:00:00 2001 From: itsdfish Date: Fri, 25 Oct 2024 07:16:52 -0400 Subject: [PATCH 1/2] update dependencies --- Project.toml | 8 ++++---- ext/TuringExt.jl | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index a7b1d02f..cc5eecb5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SequentialSamplingModels" uuid = "0e71a2a6-2b30-4447-8742-d083a85e82d1" authors = ["itsdfish"] -version = "0.11.11" +version = "0.11.12" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" @@ -29,7 +29,7 @@ TuringExt = "Turing" [compat] Distributions = "v0.24.6, 0.25" -DynamicPPL = "0.22.0,0.23.0,0.24.0,0.25,0.26.0,0.27,0.28.0" +DynamicPPL = "0.22.0,0.23.0,0.24.0,0.25,0.26.0,0.27,0.28.0,0.29.0" FunctionZeros = "0.2.0,0.3.0, 1" HCubature = "1" Interpolations = "0.14.0,0.15.0" @@ -44,7 +44,7 @@ SpecialFunctions = "1,2" Statistics = "1" StatsAPI = "1.0.0" StatsBase = "0.33.0,0.34.0" -Turing = "0.29.0,0.30.0,0.31.0,0.32, 0.33, 0.34.0" +Turing = "0.29.0,0.30.0,0.31.0,0.32,0.33,0.34.0,0.35.0" julia = "1" [extras] @@ -58,4 +58,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" [targets] -test = ["Interpolations", "KernelDensity", "Plots", "QuadGK", "SafeTestsets", "StatsBase", "Statistics", "Test", "Turing"] +test = ["Interpolations", "KernelDensity", "QuadGK", "SafeTestsets", "StatsBase", "Statistics", "Test", "Turing"] diff --git a/ext/TuringExt.jl b/ext/TuringExt.jl index 53d04038..04d38f05 100644 --- a/ext/TuringExt.jl +++ b/ext/TuringExt.jl @@ -2,6 +2,7 @@ module TuringExt import DynamicPPL: reconstruct import DynamicPPL: vectorize +import DynamicPPL: tovec using SequentialSamplingModels import SequentialSamplingModels: predict_distribution using Turing: @model @@ -32,4 +33,6 @@ end vectorize(d::SSM2D, r::NamedTuple) = [r...] reconstruct(d::SSM2D, v::NamedTuple) = deepcopy(v) +tovec(x::@NamedTuple{choice::C, rt::R}) where {C <: Integer, R <: AbstractFloat} = + [x.choice, x.rt] end From 101a187b291c9a28360bea5091757eb4694ab210 Mon Sep 17 00:00:00 2001 From: itsdfish Date: Fri, 25 Oct 2024 07:29:59 -0400 Subject: [PATCH 2/2] add plots to Project.toml test --- .github/workflows/CI.yml | 3 +-- Project.toml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ed9eb763..d7a82864 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,8 +16,7 @@ jobs: matrix: version: - '1.9' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'. - - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. - #- 'nightly' + - 'nightly' os: - ubuntu-latest arch: diff --git a/Project.toml b/Project.toml index cc5eecb5..08e4ba56 100644 --- a/Project.toml +++ b/Project.toml @@ -58,4 +58,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" [targets] -test = ["Interpolations", "KernelDensity", "QuadGK", "SafeTestsets", "StatsBase", "Statistics", "Test", "Turing"] +test = ["Interpolations", "KernelDensity", "Plots", "QuadGK", "SafeTestsets", "StatsBase", "Statistics", "Test", "Turing"]