-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
Emcee reader support #550
Emcee reader support #550
Conversation
this merge is necessary,
@OriolAbril Can you write the test suite in pytest for the new emcee "reader" and check it works in your local environment? After that I can make the changes in TravisCI to test the emcee reader as well |
I added a test for the emcee reader in its own file inside the tests folder. However I am not sure about how to implement it directly in test_data.py, because it should only executed when emcee version is >=3 but without stopping to test the regular emcee3 sampler. Here, all tests will probably fail because I think actually none of them uses emcee3, but in my local environment |
This would be a great use for a needs_emcee3 = pytest.mark.skipif(emcee.__version__ < '3', reason="emcee3 required")
...
@needs_emcee3
def test_emcee3_stuff(...):
... |
I think having individual test files for each library a good idea. Let's still use skip fixture to handle different versions. Good work! |
What @ColCarroll and @ahartikainen said about skipif :) @OriolAbril Let us know if you need help with any of this. And thank you for adding tests |
I used skipif to implement an extra test inside the class for emcee. Now the test should pass, but it may not mean I have implemented them properly because they will be skipped. What sould be changed to include emcee3 in the tests? I did not run them locally because I do not have all libraries installed (i.e. stan). Splitting them as @ahartikainen proposed would ease running them locally, at least for me. |
@OriolAbril https://docs.pytest.org/en/latest/usage.html#specifying-tests-selecting-tests |
I forgot in the previous commit
Will the |
@OriolAbril You're definitely not taking up too much of my time! I'll speak for everyone and say we really appreciate YOUR time :) If you'd like we can chat on gitter as well for faster collaboration. https://gitter.im/arviz-devs/community You are correct though. |
@OriolAbril Two more things I can mention Also annoying, youre welcome to push tests to TravisCI and see if they pass there. |
For now I'd rather push the changes here, but I will start looking into docker. Can you recommend me some tutorials? Now only the lint check is failing, I disabled all |
Is it for tests? Disable is fine. |
TBH this is mostly how I do stuff. I just run This is because I do dev work on different machines / phone, so I only need git tools and vim. |
Forgot again
Errors are not detected locally because there pylint uses emcee3
ThIs LGTM. The rest of the work is on us to add emcee3 reader testing to TravisCI If no one has any problems I'll open an issue for emcee3 reader testing and will merge in 24 hours. |
Sounds fine. LGTM |
Thanks @OriolAbril |
To this date, there are 3 possible cases to be taken into account in
from_emcee
:emcee.backend
to store the posterior in file and reading it afterwards. It is different from the "regular" emcee3 sampler because the observed data is not stored.The first two cases already work, this adds support to the 3rd case. I have run some tests manually in my computer to check they work, but I don't know how to update the tests to include different emcee versions.