Skip to content

Rust#905

Merged
s3alfisc merged 30 commits intopy-econometrics:rustfrom
schroedk:rust
May 25, 2025
Merged

Rust#905
s3alfisc merged 30 commits intopy-econometrics:rustfrom
schroedk:rust

Conversation

@schroedk
Copy link
Copy Markdown
Collaborator

@schroedk schroedk commented May 15, 2025

This PR implements the packaging of the rust components as the subpackage pyfixest.core._core_impl.
It adds dependency to pytest-benchmark for comparing the different backend implementations while testing.

So far, rust implementations are on par or faster than numba compiled code.
Bildschirmfoto 2025-05-23 um 11 57 03
Bildschirmfoto 2025-05-23 um 11 56 07
Bildschirmfoto 2025-05-23 um 11 50 38
Bildschirmfoto 2025-05-23 um 11 42 22
Bildschirmfoto 2025-05-23 um 12 16 35
Bildschirmfoto 2025-05-23 um 12 13 18

@s3alfisc
Copy link
Copy Markdown
Member

s3alfisc commented May 19, 2025

Hi Kristof (@schroedk), looks like you're making amazing progress (and I am also told that performance looks pretty promising? 😄 ). Let me know once I should start to review + in case you want me to give you the rights to run the CI yourself?

@schroedk
Copy link
Copy Markdown
Collaborator Author

Hi Alexander (@s3alfisc ), I modified the code such that the rust code will be packaged into the wheel for upload to pypi (Have a look at pyfixest.core). You can use pixi run maturin-develop to build and test the binary locally.

What is still missing:

  • extensive documentation (maybe you can help here?)
  • github CI action to build cross-platform and push to pypi (I think maturin generate-ci github --platform all> .github/workflows/CI.yml + change of secrets will do the trick)
  • finalization of package structure (is pyfixest.core.demean, pyfixest.core.collinear, what you expected?)

Next week I will be on vacation, but I will text you, when I am back. I will give you access to my fork, but you can also merge into your feature branch first if this is more convenient.

@schroedk schroedk marked this pull request as ready for review May 23, 2025 05:18
@s3alfisc
Copy link
Copy Markdown
Member

s3alfisc commented May 23, 2025

Awesome, thank you! I'll review over the next days and then likely merge into my branch (unless you'd prefer otherwise?). Plus I'll tackle the docs. I'll also take a look at package building and will play around a bit with the new pixi build feature. Have a great vacation and thanks so much!

@s3alfisc
Copy link
Copy Markdown
Member

Huh just took a look at the benchmarks, these are pretty spectacular. 10% reduction for the demeaning algo is super good! Cool! 😎

@s3alfisc s3alfisc merged commit 67cc1e9 into py-econometrics:rust May 25, 2025
1 check passed
damandhaliwal pushed a commit to damandhaliwal/pyfixest that referenced this pull request Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants