-
Notifications
You must be signed in to change notification settings - Fork 7
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
Cosmosis interface #33
Conversation
flake8 is here to stay :p it is not that hard look at all the beautiful code you wrote! :) |
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.
The changes look great! The code is well-commented and that is very helpful. Kudos!
Two things that need addressing:
- It appears the code will only sample cosmological parameters. This needs to be remedied I think.
- There are not any tests, unit/integration/otherwise.
I would add at least a few unit tests making sure that
- parameters are passed between cosmosis and firecrown correctly
- parameters get updated after each iteration of some sampler
- all of the sampler parameters/options are getting to cosmosis
We are not going for 100% coverage. Just some tests of the basic functionality to make sure we are not shipping particularly egregious bugs. ;P
I've added a set of unit tests - your numbers 1 & 3 are covered. |
The CI seems to be using an outdated version of cosmosis-standalone. I've put something in the circleci to manually install it, but that seems like a bit of a hack - advice welcome. |
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.
Some minor things. Tests look good otherwise. Still some comments left on the pr.
Concerning the tests I don’t get why running a sampler for a few steps serially and checking the output chains are called correctly requires MPI.
About circleci. I am caching the python deps to make the tests faster. You should remove the extra install line and clear the cache in the circle interface. There is a drop down menu at the top right. Just click it and rerun without the cache. We need to switch to a tagged version of cosmosis. This way pip will just install it if it is outdated. |
I've added cosmosis with a specific version to the dev reqs. It sill needs some env vars, so I've put those in the circleci. (requiring the CC, CXX and FC values to be explicitly set saves an enormous amount of pain down the road when dealing with a multi-language plugin program) The issue running a sampler has nothing to do with MPI. They can all be run serially. That's an entirely separate issue. I'll have a look at it. |
Okay, there's a test of the sampling in there now too. Just the grid sampler, so that it's entirely predictable. |
closed all but two conversations - let me know what you think on those. |
Looks great and thanks for all the work! I responded above. |
Just a few random extra lines in the docs and then it looks like we are good to go! |
is it the ones between the parameter definitions that you don't like? |
The doc strings. You missed a few. |
think I got them |
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'll clean up the docs myself later if that is ok.
sure |
merged! Or did you mean you wanted to clean them up before merging? sorry if so |
This PR re-enables the interface of FireCrown to the CosmoSIS samplers.
Sampling with most of them will now work using
firecrown sample file.yaml
Everything cosmosis-related is in the cosmosis subdirectory, and I've simplified it a bit since the previous version. If you don't have cosmosis installed the other stuff will still work.
Also I changed from sigma_8 to A_s in the examples, since the latter is the official parameter of DESC.
On a separate note - we should disable flake8 in the CI. It will put off too many potential contributors.
Closes #30