New
pytimetk 2.2.0
What's New
- Polars
.tkAccessor for LazyFrames: Added a.tkaccessor forpl.LazyFrameobjects, enabling direct access to pytimetk helpers (e.g.,df.lazy().tk.augment_rolling(...)) with performance parity to pandas and Polars DataFrame paths. This enhances support for lazy evaluation pipelines, improving efficiency for large datasets. - GPU Installation Improvements: Updated GPU support with
cudf-cu12dependency for Python 3.10+ on Linux (x86_64 or aarch64), replacing the genericcudfdependency. This ensures better compatibility and performance for GPU-accelerated workflows. - Polars LazyFrame Compatibility: Extended Polars support to include LazyFrame checks in utility functions (e.g.,
check_date_column,check_value_column), ensuring seamless integration with lazy evaluation pipelines.
Enhancements
- Refactored GroupBy Handling: Replaced direct
.objaccess on pandas GroupBy objects withresolve_pandas_groupby_frameacross the codebase. This improves compatibility with accelerated backends likecudf.pandas, ensuring robust DataFrame extraction even when proxies are used. - Memory Optimization: Enhanced
reduce_memory_usageto handle GroupBy objects more reliably by usingresolve_pandas_groupby_frameand attempting categorical conversion only when safe, improving memory efficiency for large datasets. - Documentation Updates: Improved GPU acceleration guide (
production/02_gpu_acceleration.html) with streamlined examples and updated changelog (changelog-news.html) to reflect new features and fixes.
Bug Fixes
- Sorting Issue in GPU Workflows: Fixed a sorting issue in GPU-compatible operations to ensure consistent ordering in Polars and pandas pipelines.
- Documentation Corrections: Addressed inconsistencies in the GPU guide documentation for clarity and accuracy.
Breaking Changes
- The
cudfdependency has been replaced withcudf-cu12for GPU support, requiring users to update their installation commands topip install pytimetk[gpu_cu12] --extra-index-url=https://pypi.nvidia.comfor Python 3.10+ on supported Linux platforms.
Installation
To install pytimetk 2.2.0 with GPU support:
pip install pytimetk[gpu_cu12] --extra-index-url=https://pypi.nvidia.com
pip install "polars[gpu]" --extra-index-url=https://pypi.nvidia.com
Contributors
- @mdancho84
Full Changelog: https://github.com/business-science/pytimetk/compare/v2.1.0...v2.2.0