Skip to content
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

init: m5 forecasting FE benchmark #136

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Sep 4, 2024



def q2_polars(df):
return df.with_columns(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the select + explode mapping here?

Participants typically used pandas (Polars was only just getting started at the time), so here we benchmark how long it have
taken to do the same feature engineering with Polars (and, coming soon, DuckDB).

We believe this to be a useful task to benchmark, because:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove L9-L12.

I think this can serve as a basis for more time-series related benchmarks on this datasets. I don't think we have to strictly limit to what was used in the kaggle competition.

@MarcoGorelli MarcoGorelli marked this pull request as draft September 14, 2024 11:15
@MarcoGorelli
Copy link
Contributor Author

Just got back to this - running locally, I'm seeing very good results for Polars:

*** polars lazy ***
q1 took: 20.075744923997263
q2 took: 24.77264992900018
q3 took: 28.980969234995428
(polars-benchmark) marcogorelli@DESKTOP-U8OKFP3:~/polars-benchmark/m5-forecasting-feature-engineering$ python duckdb_queries.py 
*** duckdb ***
q1 took: 176.87156045399752
q2 took: 101.69693301500229
q3 took: 115.6844151769983

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