-
Notifications
You must be signed in to change notification settings - Fork 219
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
Fix for HMCs dot_assume
#1758
Fix for HMCs dot_assume
#1758
Conversation
I think the test setup is simpler and more reliable if you just copy the tests (I guess we could use the test models but probably that's what's done already in DynamicPPL?). |
Eeeh weird. I can't reproduce the errors locally 😳 |
Aaaaight so I finally figured out what's going wrong: julia> using Tracker, Distributions
julia> m = first(param(zeros(1)))
0.0 (tracked)
julia> s = first(param(ones(1)))
1.0 (tracked)
julia> typeof(Normal.(m, s))
Tracker.Tracked{Normal{Float64}} And DistributionsAD.jl doesn't address this issue: julia> using DistributionsAD
julia> typeof(Normal.(m, s))
Tracker.Tracked{Normal{Float64}} It comes down to Tracker not handling |
Maybe related to or even the same as FluxML/Tracker.jl#65? |
Possibly! I've made a new issue as it's not completely obvious to me whether it's the same or not atm: FluxML/Tracker.jl#119 |
Now running into #1756 |
Renamed |
8da10b1
to
f604186
Compare
Co-authored-by: Tor Erlend Fjelde <[email protected]>
This should be good to go once #1762 has gone through 👍 |
Codecov Report
@@ Coverage Diff @@
## master #1758 +/- ##
==========================================
+ Coverage 81.23% 81.87% +0.63%
==========================================
Files 24 24
Lines 1471 1473 +2
==========================================
+ Hits 1195 1206 +11
+ Misses 276 267 -9
Continue to review full report at Codecov.
|
Pull Request Test Coverage Report for Build 1698293351
💛 - Coveralls |
* fixed dot_assume for hmc * copy-pasted tests from dynamicppl integration tests * inspecting what in the world is going on with tests * trying again * skip failing test for TrackerAD * bump patch version * fixed typo in tests * Rename `Turing.Core` to `Turing.Essential` * Deprecate Turing.Core Co-authored-by: Tor Erlend Fjelde <[email protected]> * fixed a numerical test * version bump Co-authored-by: David Widmann <[email protected]> Co-authored-by: David Widmann <[email protected]>
* fixed dot_assume for hmc * copy-pasted tests from dynamicppl integration tests * inspecting what in the world is going on with tests * trying again * skip failing test for TrackerAD * bump patch version * fixed typo in tests * Rename `Turing.Core` to `Turing.Essential` * Deprecate Turing.Core Co-authored-by: Tor Erlend Fjelde <[email protected]> * fixed a numerical test * version bump Co-authored-by: David Widmann <[email protected]> Co-authored-by: David Widmann <[email protected]>
* fixed dot_assume for hmc * copy-pasted tests from dynamicppl integration tests * inspecting what in the world is going on with tests * trying again * skip failing test for TrackerAD * bump patch version * fixed typo in tests * Rename `Turing.Core` to `Turing.Essential` * Deprecate Turing.Core Co-authored-by: Tor Erlend Fjelde <[email protected]> * fixed a numerical test * version bump Co-authored-by: David Widmann <[email protected]> Co-authored-by: David Widmann <[email protected]>
* New Turing-libtask integration (#1757) * Update Project.toml * Update Project.toml * Update Project.toml * trace down into functions calling produce * trace into functions in testcases * update to the latest version * run tests against new libtask * temporarily disable 1.3 for testing * Update AdvancedSMC.jl * Update AdvancedSMC.jl * Update AdvancedSMC.jl * Update AdvancedSMC.jl * Update AdvancedSMC.jl * copy Trace on tape * Implement simplified evaluator for TracedModel * Remove some unnecessary trace functions. * Minor bugfix in TracedModel evaluator. * Update .github/workflows/TuringCI.yml * Minor bugfix in TracedModel evaluator. * Update container.jl * Update Project.toml * Commented out tests related to control flow. TuringLang/Libtask.jl/issues/96 * Commented out tests related to control flow. TuringLang/Libtask.jl/issues/96 * Update Project.toml * Update src/essential/container.jl * Update AdvancedSMC.jl Co-authored-by: KDr2 <[email protected]> * CompatHelper: add new compat entry for Libtask at version 0.6 for package test, (keep existing compat) (#1765) Co-authored-by: CompatHelper Julia <[email protected]> * Fix for HMCs `dot_assume` (#1758) * fixed dot_assume for hmc * copy-pasted tests from dynamicppl integration tests * inspecting what in the world is going on with tests * trying again * skip failing test for TrackerAD * bump patch version * fixed typo in tests * Rename `Turing.Core` to `Turing.Essential` * Deprecate Turing.Core Co-authored-by: Tor Erlend Fjelde <[email protected]> * fixed a numerical test * version bump Co-authored-by: David Widmann <[email protected]> Co-authored-by: David Widmann <[email protected]> * Minor fixes. * Minor fixes. * Minor fix. * Update Julia version in CI * Merge branch 'libtask-integration' of github.com:TuringLang/Turing.jl into libtask-integration * Update Inference.jl * Minor fixes. * Add back `imm` test. * Minor tweaks to make single distribution tests more robust. * Update Project.toml Co-authored-by: David Widmann <[email protected]> * Apply suggestions from code review Co-authored-by: David Widmann <[email protected]> * Update Project.toml * Switch to StableRNGs for broken tests. * Apply suggestions from code review Co-authored-by: David Widmann <[email protected]> * Minor tweaks. * Use StableRNG for GMM test. * Update Project.toml Co-authored-by: KDr2 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: CompatHelper Julia <[email protected]> Co-authored-by: David Widmann <[email protected]> Co-authored-by: David Widmann <[email protected]>
Currently
dot_assume
for HMC is broken, which this PR fixes.This case is covered by tests, but (AFAIK) only in DynamicPPL's integration tests, not in Turing's tests.
Should I copy-paste these or is there a way we can just run the integration tests from DPPL with this Turing version?