-
Notifications
You must be signed in to change notification settings - Fork 6
Run Aqua tests #300
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
Run Aqua tests #300
Conversation
|
Oof, Aqua tests are failing because the OpenMPI dependency introduced in #296 is actually unused (and it should be, that was a hack...) |
3eeaf24 to
caee01d
Compare
|
Uh uh, Aqua detected an(other) actual issue: Lines 190 to 191 in c101d0d
|
src/filters.jl
Outdated
| # avoid unnecessary allocations. | ||
| observation_buffer .-= observation | ||
| ldiv!(cov_Y_Y, observation_buffer) | ||
| ldiv!(cov_Y_Y.chol, observation_buffer) |
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.
@matt-graham I'm just inlining the method I removed above, without explicitly defining a method which commits type piracy. Does it sound good? Tests pass locally for me with this change.
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.
Yeah can't really remember why I explicitly defined method here as it looks like cov_Y_Y will always be a subtype of AbstractPDMat, but I suspect I was originally trying to allow for cov_Y_Y being of other abstract matrix types and wasn't aware of type piracy issues. Change looks fine - possibly
| ldiv!(cov_Y_Y.chol, observation_buffer) | |
| ldiv!(cholesky(cov_Y_Y), observation_buffer) |
might be better to make code more generic / not explicitly access chol field? But this is tangential to change here.
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.
Right, that's actually similar to what they do in PDMats: https://github.com/JuliaStats/PDMats.jl/blob/5046635eba5a44901b7cec0ca68c48cf8ed967d9/src/pdmat.jl#L129, but they use also internal functions chol_lower/chol_upper
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
==========================================
- Coverage 94.50% 94.49% -0.01%
==========================================
Files 9 9
Lines 655 654 -1
==========================================
- Hits 619 618 -1
Misses 36 36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Matt Graham <[email protected]>
Diff better reviewed by ignoring whitespace changes.