-
Notifications
You must be signed in to change notification settings - Fork 36
Make default model evaluation independent of Turing #43
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
Make default model evaluation independent of Turing #43
Conversation
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.
Look good to me. Thanks.
One thing I was worried about is removing |
Not that I'm aware of. |
|
|
It will still be reexported from Turing. Same for |
The Turing side of the PR is now out as well. I wonder how to test all this in a reasonable way. The Turing integration tests over here have certainly not caught a lot of the namespace errors I made initially -- those I only discovered by testing Turing itself with this branch of DynamicPPL. |
There's some discussion about the test setup in #18. I guess ideally DynamicPPL should be tested without depending on Turing. |
I just saw that this relates to #19 as well. |
@mohamed82008 can this be merged? |
I guess it would be nice if the tests pass. The Libtask error should be fixed by now, I guess, but I assume one has to update the Turing folder in the test directory with the changes in TuringLang/Turing.jl#1151 (which should maybe be updated with master since there might have been some changes to Turing master in the mean time). |
I will review this tonight. |
@devmotion Travis is still failing solely due to the Libtask error. On my system, all DynamicPPL tests pass with Libtask fixed to the older version. From the other side, also Turing's test pass for TuringLang/Turing.jl#1151 being used together with this branch. I would have liked to update the tests already, of course, but right now I consider that all a bit too fragile for me to touch it. |
Hmm it seems that the tests still used Libtask 0.3.2, I thought the problem should be fixed with Libtask 0.3.3? |
Right -- appearently those test results are still from 5 days ago. |
Now it's just Travis killing the job because it takes so long... |
No, the problem is that the logs are too long. The problem is that the Turing test folder in DynamicPPL has not been updated with the latest changes in Turing, in particular TuringLang/Turing.jl#1156. |
Why not update it? |
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. But let's make sure the tests pass.
Alright, the Turing test folder is now updated to the state of the https://github.com/phipsgabler/Turing.jl/tree/context_independence, which is up to date with the current Turing master. All tests pass on my machine, let's see what Travis says :) |
Codecov Report
@@ Coverage Diff @@
## master #43 +/- ##
=========================================
- Coverage 88.24% 80.9% -7.34%
=========================================
Files 9 12 +3
Lines 723 880 +157
=========================================
+ Hits 638 712 +74
- Misses 85 168 +83
Continue to review full report at Codecov.
|
Thanks @phipsgabler , great work! |
The following simple evaluation does not currently work without Turing being loaded, since the
tilde
andassume
/observe
functions for the contexts provided by DynamicPPL are actually implemented in Turing:As @mohamed82008 suggested, I basically just moved the "fallback methods" from Inference.jl over here. This required some additional movements:
tilde
metafunctions in compiler.jl with "generate", to avoid name confusionNoDist
andNamedDist
had to be moved to this package, since theassume
/observe
code depends on them (crucially,LikelihoodContext
doesn't work withoutNoDist
).For testing, I didn't really now what to do and where to put it, except checking it does compile now. So I just created a new file for now.
I'd appreciate feedback on especially imports and other things I broke :) The Turing counterpart (removing the fallback methods) will follow soon.