-
Notifications
You must be signed in to change notification settings - Fork 36
Add Aqua tests #775
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
Add Aqua tests #775
Changes from 13 commits
33121d0
b64d3f7
5c7ebee
6056834
0bc1a4e
1a82abc
5bb16c4
614587c
d83e5c2
637d20e
072c3dc
c8381b2
a0b8134
b138770
fcad376
f1d5003
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,19 @@ | |
return invlink!!(t, deepcopy(vi), model) | ||
end | ||
|
||
# These two StaticTransformation methods needed to resolve ambiguities | ||
function link!!( | ||
t::StaticTransformation{<:Bijectors.Transform}, vi::ThreadSafeVarInfo, model::Model | ||
) | ||
return Accessors.@set vi.varinfo = link!!(t, vi.varinfo, model) | ||
end | ||
|
||
function invlink!!( | ||
t::StaticTransformation{<:Bijectors.Transform}, vi::ThreadSafeVarInfo, model::Model | ||
) | ||
return Accessors.@set vi.varinfo = invlink!!(t, vi.varinfo, model) | ||
end | ||
Comment on lines
+118
to
+129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of the method ambiguity fixes in this PR are really straightforward, but it took me a long time to figure out what to do here. Firstly, note that this method is only ever invoked in a very specific situation, where we have (1) multithreaded evaluation hence The DynamicPPL test suite does not ever call this method (if it did, it would have failed with a method ambiguity), and since this has never been reported before, one might justifiably assume that no user has ever called it too. To be fully honest, while I can't see any reason why this would be wrong, I also can't convince myself 100% that this is the correct behaviour. However, looking at the lines directly above this, it seems clear enough to me that the intent of that code was to suggest that all |
||
|
||
function maybe_invlink_before_eval!!(vi::ThreadSafeVarInfo, model::Model) | ||
# Defer to the wrapped `AbstractVarInfo` object. | ||
# NOTE: When computing `getlogp` for `ThreadSafeVarInfo` we do include the | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module AquaTests | ||
|
||
using Aqua: Aqua | ||
using DynamicPPL | ||
|
||
Aqua.test_all(DynamicPPL) | ||
|
||
end |
Uh oh!
There was an error while loading. Please reload this page.