-
Notifications
You must be signed in to change notification settings - Fork 32
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 tests independent of Turing #18
Comments
Even something as aggressive as copying the whole Turing src folder to the DynamicPPL test folder is better than what we have now. |
I ended up copying all of Turing to the tests folder and using that. As long as it is reasonably up to date with Turing master (up to breaking changes in DynamicPPL), it should be ok. |
Let's keep this issue open for some more discussion, in case some cleverer solution coming up later. |
Note that this is the same problem MathOptInterface has with JuMP and solver packages, and that LineSearches has with Optim. As far as I know, there is no pretty fix. The key problem here is that we need most of Turing to test "all" of the features of DynamicPPL. |
ChainRulesCore -> ChainRules has a similar situation to DynamicPPL -> Turing. The way we sort of work-around it is:
At the very least, running Turing's tests directly could hopefully reduce maintainence burden over copy-pasting Turing tests into this package. |
Thanks @nickrobinson251 for your detailed comment. Yes, running Turing tests is fine and useful. In our case, we don't need to run all of the Turing tests to test DynamicPPL, only the subset that we have in the Copying all of Turing's src to the |
IMO, as already mentioned in the initial comment, the proper solution to this problem would be to write new tests completely independent of Turing. If required, one should rather add some dummy implementation of a simple sampler (similar to the new tests in AbstractMCMC: https://github.com/TuringLang/AbstractMCMC.jl/blob/master/test/interface.jl) than depend on a copy of Turing's tests. I think the test errors in #34 illustrate that the current setup is not satisfying - introducing breaking changes in DynamicPPL requires fixing Turing's tests and implementation twice, once in Turing itself and in the test folder in DynamicPPL. I guess, this is both annoying and could lead to inconsistencies. |
The workflow I currently follow to avoid repeating any work and avoid inconsistencies is to:
The only repetition here is that of copying and pasting code, but effort-wise there is very little overhead to this approach, other than the few seconds of copying and pasting every time I want to run DynamicPPL tests. Making the tests independent is an ideal scenario but is a little too difficult right now, definitely not on top of my priority list. Feel free to take a crack at it though. |
Can we have a script or better specification for this? Simply copying Turing's
|
The problem with all the tests depending on Turing is that if a breaking change happens in DynamicPPL, there will be no version of Turing that supports this new change. So we will have to:
This essentially renders the whole CI testing process useless, because I will be developing a version of DynamicPPL and another of Turing side by side on my machine and testing them together locally. Then the Travis tests will be ignored and I will only be trusting my local tests. The solution here is to have good DynamicPPL tests independent of Turing. This may mean implementing a minimal version of Turing inside the testing suite of DynamicPPL for use in testing.
The text was updated successfully, but these errors were encountered: