functime-org / functime

Time-series machine learning at scale. Built with Polars for embarrassingly parallel feature extraction and forecasts on panel data.
https://docs.functime.ai
Apache License 2.0
1.02k stars 55 forks source link

feat: Rustify lempel_ziv_complexity #107

Closed abstractqqq closed 11 months ago

abstractqqq commented 11 months ago

Implemented the first Polars Plugin: lempel_ziv_complexity. We now have both eager and lazy version for this feature too ( and is super fast )

How to test:

  1. maturin develop --release
  2. If package is not install in local environment, do pip install .
  3. pytest tests/test_tsfresh (there is a test on lempel_ziv_complexity, which is the expr plugin implemented in this PR)

Definitely need to review this process and try to improve this process. @topher-lo

vercel[bot] commented 11 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
functime-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2023 8:44pm
ritchie46 commented 11 months ago

@messense can you shed some light on how we can ensure this best?

I thought maturin build always put the shared library in the same folder as the python code?

ritchie46 commented 11 months ago

@abstractqqq I expect you have your file names incorrect.

It is important that the name in the Cargo.toml, the python package and the rust lib match.

abstractqqq commented 11 months ago

@abstractqqq I expect you have your file names incorrect.

It is important that the name in the Cargo.toml, the python package and the rust lib match.

I think the file isn't generated in the right location on windows... I did the same thing and got it working on Linux. It is working now

messense commented 11 months ago

I thought maturin build always put the shared library in the same folder as the python code?

By default yes, but it can be changed via [tool.maturin] module-name in pyproject.toml

https://github.com/neocortexdb/functime/blob/14fa0813c524f23032947a30862551fd2fb6c957/pyproject.toml#L131

In this case it's named _functime_rust

topher-lo commented 11 months ago

@abstractqqq Apart from the conflicts (nothing too serious), I think this is good to go.