-
Notifications
You must be signed in to change notification settings - Fork 51
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 pool decorator, and multiprocessing #539
Conversation
…conflicts with pickle
cooltools/api/expected.py
Outdated
@@ -1035,6 +1035,10 @@ def per_region_smooth_cvd( | |||
) | |||
|
|||
return cvd | |||
|
|||
def _transformer(p, weight1, weight2): |
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 wonder if this might be better named _balance_transform
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.
Yea, that might be more informative. Updated
|
||
def _transformer(p, weight1, weight2): | ||
return p["count"] * p[weight1] * p[weight2] | ||
|
||
# user-friendly wrapper for diagsum_symm and diagsum_pairwise - part of new "public" API | ||
@pool_decorator | ||
def expected_cis( |
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.
would be useful to expose transforms in expected_cis? cc @sergpolly @nvictus
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.
seems that a few deletable test files got added to the PR @Yaoyx
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.
Files have been removed
@dmitrymyl I just invited you as a collaborator for the repo-- let us know if this resolves the issues you encountered! |
I checked this version against my profiling notebook -- now obs/exp pups are calculated fast and one can also supply custom map functors (as intended). So, this PR resolves both issues. Timings:
|
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.
looks good to me!
#535
#536