Skip to content

Conversation

cnhwl
Copy link
Contributor

@cnhwl cnhwl commented Apr 9, 2025

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • Added an entry under Unreleased in the Changelog.

Fixes #2730.

Summary

A first draft of refactoring the from_group_dataframe() according to #2661. Since I'm not very familiar with the Narwhals library yet, more help would be appreciated!

Copy link

codecov bot commented Apr 16, 2025

Codecov Report

❌ Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.14%. Comparing base (2ab62bd) to head (21d1860).

Files with missing lines Patch % Lines
darts/timeseries.py 84.21% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2766      +/-   ##
==========================================
- Coverage   95.23%   95.14%   -0.09%     
==========================================
  Files         146      146              
  Lines       15576    15580       +4     
==========================================
- Hits        14834    14824      -10     
- Misses        742      756      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dennisbader
Copy link
Collaborator

Hi @cnhwl, and thanks a lot for this PR! We were a bit busy over the last week with the release of Darts 0.35.0.
Next week we should be able to review it :)

@dennisbader
Copy link
Collaborator

dennisbader commented Apr 29, 2025

Hi @cnhwl and thanks for this PR, it's a very good start 🚀

I oushed some updates for this PR:

  • adapt from_group_dataframe() logic to work with polars
  • add polars to from_group_dataframe() tests

The Narwhals team is current fixing an issue related to parallelization using polars DFs wrapped by narwhals (see here). Our tests are expected to fail until then.

I will also have to test how this PR affects the performance of the current from_group_dataframe(). But I'm not too worried.

@cnhwl
Copy link
Contributor Author

cnhwl commented Apr 29, 2025

Hi @cnhwl and thanks for this PR, it's a very good start 🚀

I made some updates locally to finalize the PR:

  • adapt from_group_dataframe() logic to work with polars
  • add polars to from_group_dataframe() tests

I would like to push these changes into your branch. It seems like I don't have permission to do so. Could you grant me access to your forked Darts repository?

Of course! @dennisbader I have been added you as a collaborator on my fork repository 🤝.

@dennisbader
Copy link
Collaborator

Hi @cnhwl and sorry for the long wait. We haven't forgotten about this PR :) We're currently working on a big refactor of our TimeSeries in #2807. After that is merged, we're coming back to this one!

@cnhwl
Copy link
Contributor Author

cnhwl commented Jun 9, 2025

@dennisbader Got it, thanks for the heads-up. No problem at all, happy to wait for the refactor to be completed 🚀

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

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

Hi @cnhwl and thanks for this great PR 🚀 It looks really good!

I finally found the time now to review and make a couple of adjustment for performance reasons :)
I also compared the performance against the old version, and now we're even a bit more efficient after some updates 💯

Thanks again and sorry for the long wait!

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.

Narwhalify from_group_dataframe()
2 participants