-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update to CCLv3 #97
Update to CCLv3 #97
Conversation
Ran black and flake8 and pushed so CI could continue. |
.github/workflows/ci.yaml
Outdated
@@ -84,6 +84,8 @@ jobs: | |||
run: | | |||
export MAMBA_NO_BANNER=1 | |||
mamba env update --file ${{ env.CONDA_ENV }} | |||
# GitHub complains without this | |||
mamba install coverage |
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.
@mattkwiecien , I do not think this is a big issue, but can you check this just in case?
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.
Messaged in slack, this is because the environment name has changed. We should either change environment name everywhere or revert in enrivonment.yml
environment.yml
Outdated
@@ -13,7 +13,7 @@ dependencies: | |||
- numpy | |||
- scipy | |||
- pyyaml | |||
- pyccl>=2.5.0,<2.8.0 | |||
- pyccl>=2.3.0 |
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.
@carlosggarcia , I guess we should fix this dependence at 3.0.0, since we don't expect this to work for pyccl <=2.7.0
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.
right, that was my intention. my bad
hmf = ccl.halos.MassFuncTinker08(cosmo, mass_def=mass_def) | ||
hbf = ccl.halos.HaloBiasTinker10(cosmo, mass_def=mass_def) | ||
mass_def = ccl.halos.MassDef200m | ||
hmf = ccl.halos.MassFuncTinker08(mass_def=mass_def) |
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.
Not sure, why we use Tinker08 as default instead of Tinker10. I am using Tinker10 for ng. If there is no obvious reason to use Tinker08, we can keep this (so we don't break the current benchmarks) and I open an issue for keeping track of this (ask to Ryo and Yue)
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.
No idea. I would leave it like this for this PR to avoid mixing changes
hb = ccl.halos.HaloBiasTinker10(cosmo, mass_def=md) | ||
hmc = ccl.halos.HMCalculator(cosmo, mf, hb, md) | ||
md = ccl.halos.MassDef200m | ||
mf = ccl.halos.MassFuncTinker08(mass_def=md) |
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.
Why not Tinker10?
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.
As above
Thanks, @carlosggarcia, everything seems good! I am asking @mattkwiecien to check specific lines |
environment.yml
Outdated
@@ -1,4 +1,4 @@ | |||
name: tjpcov | |||
name: tjpcov_ccl3 |
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.
Probably want to change this back to tjpcov once you're done testing.
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.
This will actually cause the CI to fail:
TJPCov/.github/workflows/ci.yaml
Line 63 in 255cb11
activate-environment: tjpcov |
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.
Solved
# elif "wl" in tr: | ||
# assert isinstance(ccltr, ccl.WeakLensingTracer) | ||
# elif "cv" in tr: | ||
# assert isinstance(ccltr, ccl.CMBLensingTracer) |
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.
Should we create an issue for this so we don't lose track of 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.
This is now solved
.github/workflows/ci.yaml
Outdated
@@ -84,6 +84,8 @@ jobs: | |||
run: | | |||
export MAMBA_NO_BANNER=1 | |||
mamba env update --file ${{ env.CONDA_ENV }} | |||
# GitHub complains without this | |||
mamba install coverage |
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.
Messaged in slack, this is because the environment name has changed. We should either change environment name everywhere or revert in enrivonment.yml
LGTM! |
This pull request updates the code to the new API of CCLv3.
I had to slightly reduce the accuracy threshold of some tests since different versions of CCL, NaMaster, etc might have change different interpolation and integration schemes.