From c3db6d05466369c7a0325edad18859e8a5167f3e Mon Sep 17 00:00:00 2001 From: Samuel Brand Date: Mon, 11 Nov 2024 12:42:46 +0000 Subject: [PATCH 1/4] Change to BenchmarkCI fork --- .github/workflows/benchmark.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 04802aabd..bed6a37db 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -22,6 +22,7 @@ jobs: run: | julia --project=benchmark -e 'using Pkg; Pkg.rm("EpiAware"); + Pkg.add("https://github.com/SamuelBrand1/BenchmarkCI.jl"); Pkg.resolve(); Pkg.instantiate(); Pkg.develop(path = "./EpiAware")' From 394f26fa17e395a4f843d32ac74e83e3eb70da6b Mon Sep 17 00:00:00 2001 From: Samuel Brand Date: Mon, 11 Nov 2024 12:43:19 +0000 Subject: [PATCH 2/4] rm ODE benchmark --- benchmark/Project.toml | 1 - benchmark/bench/EpiInfModels/EpiInfModels.jl | 3 +-- .../bench/EpiInfModels/InfectionODEProcess.jl | 24 ------------------- 3 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 benchmark/bench/EpiInfModels/InfectionODEProcess.jl diff --git a/benchmark/Project.toml b/benchmark/Project.toml index 88dcf30da..13be17133 100644 --- a/benchmark/Project.toml +++ b/benchmark/Project.toml @@ -1,5 +1,4 @@ [deps] -BenchmarkCI = "20533458-34a3-403d-a444-e18f38190b5b" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" DynamicPPL = "366bfd00-2699-11ea-058f-f148b4cae6d8" diff --git a/benchmark/bench/EpiInfModels/EpiInfModels.jl b/benchmark/bench/EpiInfModels/EpiInfModels.jl index b07775eda..0d9ca5f1e 100644 --- a/benchmark/bench/EpiInfModels/EpiInfModels.jl +++ b/benchmark/bench/EpiInfModels/EpiInfModels.jl @@ -1,12 +1,11 @@ module BenchEpiInfModels -using BenchmarkTools, TuringBenchmarking, EpiAware, Distributions, OrdinaryDiffEq +using BenchmarkTools, TuringBenchmarking, EpiAware, Distributions suite = BenchmarkGroup() include("../../make_epiaware_suite.jl") include("DirectInfections.jl") include("ExpGrowthRate.jl") -include("ODEProcess.jl") end BenchEpiInfModels.suite diff --git a/benchmark/bench/EpiInfModels/InfectionODEProcess.jl b/benchmark/bench/EpiInfModels/InfectionODEProcess.jl deleted file mode 100644 index bc0c4b4b1..000000000 --- a/benchmark/bench/EpiInfModels/InfectionODEProcess.jl +++ /dev/null @@ -1,24 +0,0 @@ -let - r = log(2) / 7 # Growth rate corresponding to 7 day doubling time - u0 = [1.0] - p = [r] - params = ODEParams(u0 = u0, p = p) - - # Define the ODE problem using SciML - # We use a simple exponential growth model - - function expgrowth(du, u, p, t) - du[1] = p[1] * u[1] - end - prob = ODEProblem(expgrowth, u0, (0.0, 10.0), p) - - # Define the ODEProcess - - expgrowth_model = ODEProcess(prob::ODEProblem; ts = 0:1:10, - solver = Tsit5(), - sol2infs = sol -> sol[1, :]) - - # Generate the latent infections - I_t = generate_latent_infs(expgrowth_model, params)() - suite["ODEProcess"] = make_epiaware_suite(mdl) -end From d1d81d180344495c857c10a76d05a3809aa6edb1 Mon Sep 17 00:00:00 2001 From: Samuel Brand Date: Mon, 11 Nov 2024 12:47:23 +0000 Subject: [PATCH 3/4] fix `url=...` --- .github/workflows/benchmark.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index bed6a37db..a427578f1 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -22,7 +22,7 @@ jobs: run: | julia --project=benchmark -e 'using Pkg; Pkg.rm("EpiAware"); - Pkg.add("https://github.com/SamuelBrand1/BenchmarkCI.jl"); + Pkg.add(url="https://github.com/SamuelBrand1/BenchmarkCI.jl"); Pkg.resolve(); Pkg.instantiate(); Pkg.develop(path = "./EpiAware")' From 8c24ee80d3828f3a586b0788460c87361fd6a0ce Mon Sep 17 00:00:00 2001 From: Samuel Brand Date: Mon, 11 Nov 2024 13:02:52 +0000 Subject: [PATCH 4/4] catch dep error --- benchmark/bench/EpiInfModels/DirectInfections.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/bench/EpiInfModels/DirectInfections.jl b/benchmark/bench/EpiInfModels/DirectInfections.jl index 7ab991189..ca2066bee 100644 --- a/benchmark/bench/EpiInfModels/DirectInfections.jl +++ b/benchmark/bench/EpiInfModels/DirectInfections.jl @@ -1,5 +1,5 @@ let - using Distributions, OrdinaryDiffEq + using Distributions gen_int = [0.2, 0.3, 0.5] transformation = exp