Optimize rake by replacing ipfn with vectorized IPF#135
Optimize rake by replacing ipfn with vectorized IPF#135neuralsorcerer wants to merge 4 commits intofacebookresearch:mainfrom
Conversation
|
@talgalili has imported this pull request. If you are a Meta employee, you can view this in D86672684. |
|
Thanks @neuralsorcerer - this is super cool! Since this is a 'big deal' change, could you please:
WDYT? |
I was planning to add more tests incrementally in upcoming PRs. I am happy to add more tests in this PR if we are fine with it.
That's a great suggestion. Will do it :) |
|
Regarding 2 - thanks!
Regarding 1 - doing more ipfn tests as a separate PR is best. And then we
can check the current diff won't break them. This would increase our
confidence that no edge cases are misssed.
…On Monday, November 10, 2025, Soumyadip Sarkar ***@***.***> wrote:
*neuralsorcerer* left a comment (facebookresearch/balance#135)
<#135 (comment)>
1. Consider buffing up the tests for raking - just to make sure we're
not missing any edge cases for this change? (if you think it's good as is,
then feel free to keep it as is)
I was planning to add more tests incrementally in upcoming PRs. I am happy
to add more tests in this PR if we are fine with it.
2. Add code (and output) for doing a benchmark before and after the
change - just so we'll get a sense of the gain? while I like skipping ipdf
from the dependency, I want to make sure there are no edge cases that ipfn
will solve now (or in the future), that we will miss.
That's a great suggestion. Will do it :)
—
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHOJBQEXXVHL3XC2LUTKVL34CV5VAVCNFSM6AAAAACLUJFVPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMJSGQZDCNBQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@neuralsorcerer has updated the pull request. You must reimport the pull request before landing. |
|
@neuralsorcerer has updated the pull request. You must reimport the pull request before landing. |
|
Added
|
|
Great job, thanks @neuralsorcerer ! I'm working to get this land in the coming hour. |
|
FYI @neuralsorcerer |
|
No hurries and thank you for working on it @talgalili |
|
@talgalili merged this pull request in 21d657a. |
Added a vectorized
_run_ipf_numpyhelper that mirrors the original ipfn behaviour while avoiding the package dependency. Reworked the raking workflow to feed the new solver, rebuild the cell-weight mapping via DataFrame joins, and return the historicalrake_weightseries shape.