diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 993594b..87638d2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -48,3 +48,24 @@ jobs: file: lcov.info token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true + jet: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + - uses: actions/cache@v5 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-jet-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-jet-${{ env.cache-name }}- + ${{ runner.os }}-jet- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + env: + GROUP: JET diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index 2ea2136..60ddf7b 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -12,6 +12,7 @@ on: - 'docs/**' jobs: test: + if: false # Disabled until dependency compatibility issues are resolved. See https://github.com/SciML/DiffEqBayes.jl/issues/370 runs-on: ubuntu-latest strategy: matrix: diff --git a/Project.toml b/Project.toml index fc3ced6..0b24212 100644 --- a/Project.toml +++ b/Project.toml @@ -56,12 +56,11 @@ StanSample = "6, 7" StructArrays = "0.7" TransformVariables = "0.8" TransformedLogDensities = "1" -Turing = "0.38, 0.39, 0.40" +Turing = "0.42" julia = "1.10" [extras] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" ParameterizedFunctions = "65888b18-ceab-5e60-b2b9-181511a3b968" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -71,4 +70,4 @@ SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["ADTypes", "JET", "Test", "Pkg", "OrdinaryDiffEq", "ParameterizedFunctions", "SafeTestsets", "StatsBase", "SteadyStateDiffEq"] +test = ["ADTypes", "Test", "Pkg", "OrdinaryDiffEq", "ParameterizedFunctions", "SafeTestsets", "StatsBase", "SteadyStateDiffEq"] diff --git a/docs/Project.toml b/docs/Project.toml index e4ee550..3c55f87 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -29,4 +29,4 @@ StanSample = "7" StatsBase = "0.33, 0.34" StatsPlots = "0.15" TransformVariables = "0.8" -Turing = "0.38, 0.39, 0.40" +Turing = "0.42" diff --git a/src/abc_inference.jl b/src/abc_inference.jl index 5e9ef00..fa44322 100644 --- a/src/abc_inference.jl +++ b/src/abc_inference.jl @@ -29,7 +29,7 @@ function createabcfunction( end function abc_inference( - prob::DiffEqBase.DEProblem, alg, t, data, priors; ϵ = 0.001, + prob::SciMLBase.AbstractSciMLProblem, alg, t, data, priors; ϵ = 0.001, distancefunction = euclidean, ABCalgorithm = ABCSMC, progress = false, num_samples = 500, maxiterations = 10^5, save_idxs = nothing, diff --git a/src/dynamichmc_inference.jl b/src/dynamichmc_inference.jl index 6794edb..82c97e5 100644 --- a/src/dynamichmc_inference.jl +++ b/src/dynamichmc_inference.jl @@ -102,7 +102,7 @@ posterior values (transformed from `ℝⁿ`). - `mcmc_kwargs` are passed on as keyword arguments to `DynamicHMC.mcmc_with_warmup` """ function dynamichmc_inference( - problem::Union{DiffEqBase.DEProblem, DiffEqBase.AbstractNonlinearProblem}, algorithm, t, data, + problem::SciMLBase.AbstractSciMLProblem, algorithm, t, data, parameter_priors, parameter_transformations = as( Vector, asℝ₊, diff --git a/src/stan_inference.jl b/src/stan_inference.jl index 93093ac..852f409 100644 --- a/src/stan_inference.jl +++ b/src/stan_inference.jl @@ -55,7 +55,7 @@ function generate_theta(n::Integer, priors) end function stan_inference( - prob::Union{DiffEqBase.DEProblem, DiffEqBase.AbstractNonlinearProblem}, + prob::SciMLBase.AbstractSciMLProblem, alg, # Positional arguments t, diff --git a/test/jet/Project.toml b/test/jet/Project.toml new file mode 100644 index 0000000..ab0edc8 --- /dev/null +++ b/test/jet/Project.toml @@ -0,0 +1,4 @@ +[deps] +DiffEqBayes = "ebbdde9d-f333-5424-9be2-dbf1e9acfb5e" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/jet.jl b/test/jet/jet_tests.jl similarity index 100% rename from test/jet.jl rename to test/jet/jet_tests.jl diff --git a/test/runtests.jl b/test/runtests.jl index e726e57..4adde2c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -22,8 +22,11 @@ if GROUP == "Stan" || GROUP == "All" end end -if GROUP == "JET" || GROUP == "All" +if GROUP == "JET" + using Pkg + Pkg.activate(joinpath(@__DIR__, "jet")) + Pkg.instantiate() @time @safetestset "JET" begin - include("jet.jl") + include("jet/jet_tests.jl") end end