-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Roadmap Pull Request] Add Optional Narwhals Backend-Agnostic strict_temporal_ordering for TimeFrame (#49) #50
Merged
philip-ndikum
merged 7 commits into
main
from
feature/partition-narwhals-compatibility-41
Dec 9, 2024
Merged
[Roadmap Pull Request] Add Optional Narwhals Backend-Agnostic strict_temporal_ordering for TimeFrame (#49) #50
philip-ndikum
merged 7 commits into
main
from
feature/partition-narwhals-compatibility-41
Dec 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…namespaces - Established consistent namespace structure for partitioning workflows. - Added static and dynamic directories with clear documentation. - Removed redundant files and organized padding functionality into single_target namespace.
…oner - Added reusable utility functions in `utils.py` for single-target partitioning workflows. - Implemented `SlidingWindowPartitioner` with dynamic validation and verbose configuration. - Included validation for train, test, and validation percentages and cardinality checks. - Prepared for seamless integration with future algorithms like `ExpandingWindowPartitioner` and similar implementations.
…core_utils with 100% coverage - implemented strict temporal ordering logic in core_utils.py and integrated it into temporal_data_loader.py - refactored `validate_dataframe_column_types` to ensure `time_col` supports numeric or datetime types and all other columns are numeric - updated unit tests in `test_core_utils.py` to align with the updated validation function - removed redundant `nw.from_native` in tests, ensuring Narwhals API handles conversions natively - improved code coverage in `temporal_data_loader.py` and adjusted unit tests for partition utilities - resolved regex mismatches in tests for error validation messages - maintained a clean modular design by centralizing validation in core_utils.py, facilitating reuse and ensuring consistency across the codebase
…o be at 100% refactoring some bugs in previous sorting logic when given an id_col - Fixed logic for sorting validation
…alidation feat(core): add optional strict temporal ordering and enhance validation - Introduced `strict_temporal_ordering` functionality for backend-agnostic validation of global or group-specific temporal ordering and uniqueness. - Extended the `TimeFrame` class with the `strict_temporal_order` parameter to optionally enforce rigorous temporal validation. - Updated `core_utils` with utility functions supporting strict temporal ordering and group-level uniqueness checks. - Enhanced test coverage to 100%, covering all edge cases for new and existing features. - Updated tutorials and integration tests to reflect the new functionality. - Removed outdated tests and ensured full compliance with modern Narwhals backend compatibility. This enhancement bridges the gap between flexible mixed-frequency workflows and scenarios requiring strict temporal guarantees, aligning with the library's core philosophy.
…dated tutorial to show output for new end-users
philip-ndikum
changed the title
Feature/partition narwhals compatibility 41
[Roadmap] Add Optional Narwhals Backend-Agnostic strict_temporal_ordering for TimeFrame (#49)
Dec 9, 2024
philip-ndikum
changed the title
[Roadmap] Add Optional Narwhals Backend-Agnostic strict_temporal_ordering for TimeFrame (#49)
[Roadmap Pull Request] Add Optional Narwhals Backend-Agnostic strict_temporal_ordering for TimeFrame (#49)
Dec 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
PR Type
Description
This PR introduces the optional
strict_temporal_ordering
functionality for the TemporalScope library, addressing the need for backend-agnostic strict temporal validation. Key enhancements include:strict_temporal_ordering
function incore_utils.py
:TimeFrame
class:strict_temporal_order
parameter for optional strict validation.These changes align with the roadmap, ensuring TemporalScope supports modern ML/DL workflows while remaining flexible for exploratory/scientific research and mixed-frequency use cases.
Related Issues
strict_temporal_ordering
forTimeFrame
#49Testing
Added/Updated Tests
How Has This Been Tested?
This feature has been validated through:
TimeFrame
class and partitioning functions.Test Configuration
Checklist
Additional Notes
This enhancement bridges the gap between flexible mixed-frequency workflows and scenarios requiring rigorous temporal guarantees. It ensures backward compatibility, with strict validation being entirely opt-in.