Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrals 4 upgrade #148

Merged
merged 23 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ on:
- 'docs/**'
jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
group:
- Core
version:
- '1'
- '1.6'
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
Expand Down
12 changes: 6 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
Aqua = "0.8"
BenchmarkTools = "1"
ComponentArrays = "0.15"
Cuba = "2"
Cubature = "1.5"
DiffEqBase = "6.100"
DiffEqNoiseProcess = "5"
Distributions = "0.23, 0.24, 0.25"
FiniteDiff = "2"
ForwardDiff = "0.10"
Integrals = "3.1"
IntegralsCuba = "0.2"
IntegralsCubature = "0.2"
Integrals = "4"
KernelDensity = "0.6"
LinearAlgebra = "1"
OrdinaryDiffEq = "6"
Expand All @@ -56,11 +56,11 @@ julia = "1.6"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
Cuba = "8a292aeb-7a57-582c-b821-06e4c11590b1"
Cubature = "667455a9-e2ce-5579-9412-b964f529a492"
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Integrals = "de52edbc-65ea-441a-8357-d3a637375a31"
IntegralsCuba = "e00cd5f1-6337-4131-8b37-28b2fe4cd6cb"
IntegralsCubature = "c31f79ba-6e32-46d4-a52f-182a8ac42a54"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
Expand All @@ -74,4 +74,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"

[targets]
test = ["Test", "Aqua", "SafeTestsets", "TestExtras", "Pkg", "PkgBenchmark", "BenchmarkTools", "ReferenceTests", "SymPy", "Random", "OrdinaryDiffEq", "ComponentArrays", "ForwardDiff", "Integrals", "IntegralsCubature", "IntegralsCuba", "FiniteDiff", "RecursiveArrayTools", "StochasticDiffEq"]
test = ["Test", "Aqua", "SafeTestsets", "TestExtras", "Pkg", "PkgBenchmark", "BenchmarkTools", "ReferenceTests", "SymPy", "Random", "OrdinaryDiffEq", "ComponentArrays", "ForwardDiff", "Integrals", "Cubature", "Cuba", "FiniteDiff", "RecursiveArrayTools", "StochasticDiffEq"]
3 changes: 1 addition & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[deps]
Cuba = "8a292aeb-7a57-582c-b821-06e4c11590b1"
DiffEqGPU = "071ae1c0-96b5-11e9-1965-c90190d839ea"
DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
IntegralsCuba = "e00cd5f1-6337-4131-8b37-28b2fe4cd6cb"
KernelDensity = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b"
MCMCChains = "c7f686f2-ff18-58e9-bc7b-31028e88f75d"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
Expand All @@ -26,7 +26,6 @@ DifferentialEquations = "7"
Distributions = "0.25"
Documenter = "1"
ForwardDiff = "0.10"
IntegralsCuba = "0.3"
KernelDensity = "0.6"
MCMCChains = "6"
Optimization = "3"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/gpu_bayesian.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Let's start by importing all the necessary libraries:
using OrdinaryDiffEq
using Turing, MCMCChains, Distributions
using KernelDensity
using SciMLExpectations, IntegralsCuba
using SciMLExpectations, Cuba
using DiffEqGPU
using Plots, StatsPlots
using Random;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ It is also possible to solve the various simulations in parallel by using the `b
The default quadrature algorithm to solve `ExpectationProblem` does not support batch-mode evaluation. So, we first load dependencies for additional quadrature algorithms

```@example introduction
using IntegralsCuba
using Cuba
```

We then solve our expectation as before, using a `batch=10` multi-thread parallelization via `EnsembleThreads()` of Cuba's SUAVE algorithm. We also introduce additional uncertainty in the model parameter.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/process_noise.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This done by representing the Wiener process using the [Kosambi–Karhunen–Lo

```@example process_noise
using SciMLExpectations
using IntegralsCuba
using Cuba
using StochasticDiffEq
using DiffEqNoiseProcess
using Distributions
Expand Down
3 changes: 2 additions & 1 deletion src/expectation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ function integrate(quadalg, adalg::AbstractExpectationADAlgorithm, f, lb::TB, ub
nout = 1, batch = 0,
ChrisRackauckas marked this conversation as resolved.
Show resolved Hide resolved
kwargs...) where {TB}
#TODO check batch iip type stability w/ IntegralProblem{XXXX}
prob = IntegralProblem{batch > 0}(f, lb, ub, p; nout = nout, batch = batch)
batch = batch==0 ? nothing : batch
prob = IntegralProblem(f, lb, ub, p; nout = nout, batch = batch)
ChrisRackauckas marked this conversation as resolved.
Show resolved Hide resolved
solve(prob, quadalg; kwargs...)
end

Expand Down
6 changes: 0 additions & 6 deletions src/system_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ function SystemMap(prob, alg::SciMLBase.AbstractODEAlgorithm,
SystemMap(prob, alg, ensemblealg, kwargs)
end

function (sm::SystemMap{DT})(u0, p) where {DT}
prob::DT = remake(sm.prob,
u0 = convert(typeof(sm.prob.u0), u0),
p = convert(typeof(sm.prob.p), p))
solve(prob, sm.alg; sm.kwargs...)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this call removed? Isn't this what's causing the failure?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have deleted the wrong one:
https://github.com/SciML/SciMLExpectations.jl/blob/master/test/interface.jl#L8-L13
But it is strange I and CI don't get errors about this piece missing, while @AayushSabharwal does. I guess safetestsets are not completely separated?
I'll switch it around and see what it gives.


"""
```julia
Expand Down
2 changes: 1 addition & 1 deletion test/processnoise.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Test, TestExtras

using SciMLExpectations
using IntegralsCuba
using Cuba
using StochasticDiffEq
using DiffEqNoiseProcess
using Distributions
Expand Down
14 changes: 8 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using SafeTestsets
using SafeTestsets, Test

@safetestset "Quality Assurance" begin include("qa.jl") end
@safetestset "Expectation Process Noise Tests" begin include("processnoise.jl") end
@safetestset "Expectation Interface Tests" begin include("interface.jl") end
@safetestset "Expectation Solve Tests" begin include("solve.jl") end
@safetestset "Expectation Differentiation Tests" begin include("differentiation.jl") end
@testset "Integrals" begin
@safetestset "Quality Assurance" include("qa.jl")
@safetestset "Expectation Process Noise Tests" include("processnoise.jl")
@safetestset "Expectation Interface Tests" include("interface.jl")
@safetestset "Expectation Solve Tests" include("solve.jl")
@safetestset "Expectation Differentiation Tests" include("differentiation.jl")
end
2 changes: 1 addition & 1 deletion test/solve.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test, TestExtras,
SciMLExpectations, OrdinaryDiffEq, Distributions,
Integrals, IntegralsCubature, IntegralsCuba,
Integrals, Cubature, Cuba,
StaticArrays, ComponentArrays, Random

quadalgs = [
Expand Down
Loading