-
Notifications
You must be signed in to change notification settings - Fork 21
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
Soss test (update of #62) #135
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thanks @devmotion and @willtebbutt ! I'm sure there's just a missing method, and I'd love to have some more tests anyway. I'll have a look |
An additional problem is that apparently SampleChainsDynamicHMC requires Julia 1.5. |
testvalue This is defined in MeasureTheory. The semantics are to return a point in the support, like MeasureTheory.testvalue(d::Distributions.Distribution) = rand(d) Julia 1.5 |
I didn't realize I'm reexporting MeasureTheory from Soss, I'll need to change that to make Distributions usable. This is a breaking change, so we'll be at v0.18 |
This is quite unfortunate since there is no reason for us to drop support for Julia 1.3 and 1.4 at this point. Probably then we have to separate Soss and its dependencies into a separate environment if we want to test it, and make the tests optional. |
I'll try things out with 1.3, maybe it works or could be made to work without much trouble |
Getting closer! I'm now at julia> include("test/compat/soss.jl")
latent GP regression: Error During Test at /home/chad/git/AbstractGPs.jl/test/compat/soss.jl:45
Test threw exception
Expression: length(Soss.sample(DynamicHMCChain, m | (y = y,), 5)) == 5
Not implemented:
xform(FiniteGP{GP{ZeroMean{Float64}, Matern32Kernel}, RowVecs{Float64, Matrix{Float64}, SubArray{Float64, 1, Matrix{Float64}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}(
f: GP{ZeroMean{Float64}, Matern32Kernel}(ZeroMean{Float64}(), Matern 3/2 Kernel)
x: SubArray{Float64, 1, Matrix{Float64}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}[[1.284670749722735], [-0.48905837672741387], [1.234744953422099]]
Σy: [1.0e-18 0.0 0.0; 0.0 1.0e-18 0.0; 0.0 0.0 1.0e-18]
)
) This means Soss needs to know how to transform a Gaussian process to R^n, so we'll need to think about the right way to set this up. The obvious approach is just to make AbstractGPs a dependency of Soss (probably with |
IMO it should just work since |
Regarding your previous question:
No, there's nothing like this in Distributions (at least I am not aware of anything). Probably the safest option is to sample from the distribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. I just have one question that I don't want to prevent you from merging.
Regarding the GROUP
environment variable, do we ever set it to anything other than All
or AbsrtactGPs
? I'm just wondering whether there are actually situation in which we just want to run the compat tests?
No, probably the "Compat" alternative could/should be removed. Some background info: |
It also seems that sometimes Soss/DynamicHMC fails due to numerical errors. I assume that the variance can become too small, either in the warmup phase or during sampling. I'll check if it is sufficient to add some small positive offset (similar to what we do when plotting samples). |
Codecov Report
@@ Coverage Diff @@
## master #135 +/- ##
=======================================
Coverage 99.22% 99.22%
=======================================
Files 9 9
Lines 259 259
=======================================
Hits 257 257
Misses 2 2 Continue to review full report at Codecov.
|
I just updated #62 some days ago. However, unfortunately, sampling with Soss fails due to errors such as
Since I am new to Soss I am not completely sure but to me it seems this could be a bug in Soss? Or do I use it incorrectly @cscherrer?