-
Notifications
You must be signed in to change notification settings - Fork 67
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
DRAFT: feature: partial caching of chromatic Fourier design matrix #400
base: master
Are you sure you want to change the base?
DRAFT: feature: partial caching of chromatic Fourier design matrix #400
Conversation
@jeremy-baier linting failed. Can you run the linter? I think |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #400 +/- ##
==========================================
+ Coverage 85.33% 85.41% +0.07%
==========================================
Files 13 13
Lines 3158 3167 +9
==========================================
+ Hits 2695 2705 +10
+ Misses 463 462 -1
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@AaronDJohnson looks like everything is passing now except one part of the code cov. Does that just mean I have to make a test for the 2 added functions? |
@jeremy-baier codecov measures the number of lines covered by tests. So more tests will increase codecov % as long as those lines that you're covering are not already tested. |
@AaronDJohnson I added a test which covers both of the added functions. This seemed to satisfy the |
marking this as a draft for a second because I need to check one part of the compatibility with |
@jeremy-baier , I marked it as a draft by just using the feature. Or did you by now verified this is compatible? |
hi @vhaasteren, thanks for following up on this. |
This PR adds the ability to cache portions of the construction of the chromatic Fourier design matrix.
Initially testing on NG15yr data shows a 10x speed up to the recalculation of the chromatic Fmat construction.
This constitutes anywhere between a 3% to 15% speed up of the overall likelihood calculation for single pulsar noise when sampling in the chromatic index, alpha.
As the function docstrings say, the actual caching occurs via the
@function
decorator, which now wraps the later function, caching the initially passed arguments which include the achromatic portion of the Fourier design matrix and the division of TOA observational frequencies by a reference frequency.This will be implemented in the
chromatic_noise_block()
ofenterprise_extensions
for automatic caching when sampling in the chromatic index.