-
-
Notifications
You must be signed in to change notification settings - Fork 25.5k
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
[MRG] Common Private Loss Module with tempita #20567
Conversation
I suppose that we should get the same performance as in #19088 because in the end the generated code should be equivalent, right? |
All 🟢 again!!! |
Technically, there are 2 reviewers' approval. @thomasjpfan If you are also good with it, we could be close to merge? BWT, thanks for convincing me of composition over inheritance. I should have read Design Patterns (1994) by the GoF more carefully. In particular, we avoid to rely on Cython multiple inheritance. |
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.
Second seal of approval since my last review: this LVGTM! Thank you, @lorentzenchr.
I think this PR has been standing still without attention for a long time.
I believe this can be merged but I would for other reviewers' approval.
+1 for merging with 2 approvals, particularly since it doesn't affect any of the estimators yet and is a private API. |
If only someone would press that button 🙏 Preferably, it's not the committer of the PR. |
@rth ❤️ |
Reference Issues/PRs
Solves #15123.
This is an altenative to #19088. This PR uses Cython Tempita to generate Cython code from a template as is already done in
_sag_fast.pyx.tp
and_seq_dataset.pyx.tp
.See #19088 (comment), issue #15123 and file
_loss.pyx.tp
(# Design:
) for design choices.Using Tempita helps reducing repeating code patterns for loops over samples in order to guarantee inlining.