-
Notifications
You must be signed in to change notification settings - Fork 32
Link varinfo by default in AD testing utilities; make test suite run on linked varinfos #890
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
Conversation
Benchmark Report for Commit 976885cComputer Information
Benchmark Results
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## breaking #890 +/- ##
=========================================
Coverage 84.75% 84.76%
=========================================
Files 35 35
Lines 3877 3879 +2
=========================================
+ Hits 3286 3288 +2
Misses 591 591 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
LGTM!
I've actually been thinking about the interface a bit again, I thought that just using |
84aa53c
to
41c32a0
Compare
77faa53
to
e37e6bb
Compare
1f4ec6f
to
dc04166
Compare
Closes #891
dc04166
to
9bf0593
Compare
@sunxd3 Sorry to mess with you! Decided to change a few more things in the PR. It's mostly motivated by ADTests, because over there I need to run the AD and then catch the error to tell what went wrong (e.g. is it NaN or just outright wrong). The DPPL tests now use linked varinfo too. I think it's all looking better now. |
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.
In general, all make sense.
src/test_utils/ad.jl
Outdated
It will also perform _linking_, that is, the parameters in the VarInfo will | ||
be transformed to unconstrained Euclidean space if they aren't already in | ||
that space. Note that the act of linking may change the length of the | ||
parameters. To disable linking, set `linked=false`. |
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.
I think this paragraph should be removed from this version?
And instead say something like "by default, we'll use linked (explaining what "link" means) varinfo..."
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.
Oh, this is my bad. I messed with the interface a few times and forgot to update this.
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.
Changed now!
src/test_utils/ad.jl
Outdated
value_atol::Real=1e-6, | ||
grad_atol::Real=1e-6, |
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.
might as well be Float(even Float64
)? my opinion is not strong here, just a mention.
Also could value_atol
and grad_atol
have different types?
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.
Actually, yes, I think some of these Reals should be AbstractFloats? I think f64 might be a bit too restrictive, I guess it's pretty much always going to be f64 in regular usage, but since this is an exported interface I figured it should be generic.
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.
Thanks!
* Release 0.36 * AbstractPPL 0.11 + change prefixing behaviour (#830) * AbstractPPL 0.11; change prefixing behaviour * Use DynamicPPL.prefix rather than overloading * Remove VarInfo(VarInfo, params) (#870) * Unify `{untyped,typed}_{vector_,}varinfo` constructor functions (#879) * Unify {Untyped,Typed}{Vector,}VarInfo constructors * Update invocations * NTVarInfo * Fix tests * More fixes * Fixes * Fixes * Fixes * Use lowercase functions, don't deprecate VarInfo * Rewrite VarInfo docstring * Fix methods * Fix methods (really) * Link varinfo by default in AD testing utilities; make test suite run on linked varinfos (#890) * Link VarInfo by default * Tweak interface * Fix tests * Fix interface so that callers can inspect results * Document * Fix tests * Fix changelog * Test linked varinfos Closes #891 * Fix docstring + use AbstractFloat * Fix `condition` and `fix` in submodels (#892) * Fix conditioning in submodels * Simplify contextual_isassumption * Add documentation * Fix some tests * Add tests; fix a bunch of nested submodel issues * Fix fix as well * Fix doctests * Add unit tests for new functions * Add changelog entry * Update changelog Co-authored-by: Hong Ge <[email protected]> * Finish docs * Add a test for conditioning submodel via arguments * Clean new tests up a bit * Fix for VarNames with non-identity lenses * Apply suggestions from code review Co-authored-by: Markus Hauru <[email protected]> * Apply suggestions from code review * Make PrefixContext contain a varname rather than symbol (#896) --------- Co-authored-by: Hong Ge <[email protected]> Co-authored-by: Markus Hauru <[email protected]> --------- Co-authored-by: Markus Hauru <[email protected]> Co-authored-by: Hong Ge <[email protected]> Co-authored-by: Markus Hauru <[email protected]>
This is a followup from yesterday's meeting.
I think this is a breaking change, so merging into minor release...