-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
CI TRIGGER #184
CI TRIGGER #184
Conversation
@ChrisRackauckas This package is in a bad shape. I cannot finish the CI improvements as is. |
@frankschae would you be able to take a look in the next week? |
Yup, I'll have a look. |
Are the Core1 tests actually running? |
Yes, it might be slowing down due to depwarns or something though. I suspect there must be one part of the test that got a lot slower. |
Are the https://github.com/SciML/SciMLBase.jl/blob/master/src/ensemble/ensemble_analysis.jl They seem to be the most likely origin for the remaining dep warnings in @testset "Brownian Bridge" begin
using DiffEqNoiseProcess, DiffEqBase, Test, Random, DiffEqBase.EnsembleAnalysis
Random.seed!(100)
W = BrownianBridge(0.0, 1.0, 0.0, 1.0, 0.0, 0.0)
prob = NoiseProblem(W, (0.0, 1.0))
ensemble_prob = EnsembleProblem(prob)
@time sol = solve(ensemble_prob, dt = 0.1, trajectories = 100000)
# Spot check the mean and the variance
qs = 0:0.1:1
for i in 2:10
q = qs[i]
@test ≈(timestep_mean(sol, i), q, atol = 1e-2)
@test ≈(timestep_meanvar(sol, i)[2], (1 - q) * q, atol = 1e-2)
end
@test ≈(timestep_mean(sol, 1)[1], 0.0, atol = 1e-16)
@test ≈(timestep_meanvar(sol, 1)[2], 0.0, atol = 1e-16)
@test ≈(timestep_mean(sol, 11)[1], 1.0, atol = 1e-16)
@test ≈(timestep_meanvar(sol, 11)[2], 0.0, atol = 1e-16)
μ = 1.2
σ = 2.2
W = GeometricBrownianBridge(μ, σ, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0)
prob = NoiseProblem(W, (0.0, 1.0))
ensemble_prob = EnsembleProblem(prob)
@time sol = solve(ensemble_prob, dt = 0.1, trajectories = 100)
Random.seed!(100)
r = 100 # should be independent of the rate, so make it crazy
rate(u, p, t) = r
W = CompoundPoissonBridge(rate, 0.0, 1.0, 0.0, 1.0)
prob = NoiseProblem(W, (0.0, 1.0))
ensemble_prob = EnsembleProblem(prob)
@time sol = solve(ensemble_prob, dt = 0.1, trajectories = 100000)
# Spot check the mean and the variance
qs = 0:0.1:1
for i in 2:10
q = qs[i]
# Mean and variance of binomial matches that of the Brownian bridge!
@test ≈(timestep_mean(sol, i), q, atol = 1e-2)
@test ≈(timestep_meanvar(sol, i)[2], (1 - q) * q, atol = 1e-2)
end
@test ≈(timestep_mean(sol, 1)[1], 0.0, atol = 1e-16)
@test ≈(timestep_meanvar(sol, 1)[2], 0.0, atol = 1e-16)
@test ≈(timestep_mean(sol, 11)[1], 1.0, atol = 1e-16)
@test ≈(timestep_meanvar(sol, 11)[2], 0.0, atol = 1e-16)
# check VBT distributional properties
W = VirtualBrownianTree(0.0, 0.0; Wend = 1.0, tree_depth = 3)
prob = NoiseProblem(W, (0.0, 1.0))
function prob_func(prob, i, repeat)
# to re-instantiate PRNG
Wtmp = VirtualBrownianTree(0.0, 0.0; Wend = 1.0, tree_depth = 3)
remake(prob, noise = Wtmp)
end
ensemble_prob = EnsembleProblem(prob, prob_func = prob_func)
@time sol = solve(ensemble_prob, dt = 0.125, trajectories = 100000)
# Spot check the mean and the variance
qs = 0:0.125:1
for i in 2:8
q = qs[i]
@test ≈(timestep_mean(sol, i), q, atol = 1e-2)
@test ≈(timestep_meanvar(sol, i)[2], (1 - q) * q, atol = 1e-2)
end
@test ≈(timestep_mean(sol, 1)[1], 0.0, atol = 1e-16)
@test ≈(timestep_meanvar(sol, 1)[2], 0.0, atol = 1e-16)
@test ≈(timestep_mean(sol, Int(2^(W.tree_depth) + 1))[1], W.W[end], atol = 1e-16)
@test ≈(timestep_meanvar(sol, Int(2^(W.tree_depth) + 1))[2], 0.0, atol = 1e-16)
end |
Looks like a one liner SciML/SciMLBase.jl#598 The only depwarns I get in the test above are from |
No description provided.