Datasetsplitter now autoselect suitable KFold splitter based on input…#124
Merged
Datasetsplitter now autoselect suitable KFold splitter based on input…#124
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
==========================================
+ Coverage 92.52% 92.60% +0.07%
==========================================
Files 28 28
Lines 2435 2473 +38
==========================================
+ Hits 2253 2290 +37
- Misses 182 183 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the DatasetSplitter class to automatically select appropriate cross-validation splitters based on provided parameters and adds validation to ensure proper parameter handling across the codebase. The changes close issue #121 by implementing auto-selection functionality for K-fold splitters.
- Auto-selection of appropriate splitters (KFold, StratifiedKFold, GroupKFold, StratifiedGroupKFold) based on groupby and stratify parameters
- Added validation warnings when incompatible splitters are used with grouping/stratification features
- Enhanced parameter validation in base classes to ensure proper implementation patterns
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tpcp/validate/_cross_val_helper.py | Enhanced DatasetSplitter with auto-selection logic and validation warnings |
| tpcp/_base.py | Added strict parameter validation and improved factory handling |
| tests/test_pipelines/test_validate.py | Added comprehensive tests for auto-selection and validation warnings |
| tests/test_base.py | Updated tests for new parameter validation behavior |
| CHANGELOG.md | Documented breaking changes and new features |
Comments suppressed due to low confidence (1)
tpcp/validate/_cross_val_helper.py:43
- [nitpick] The parameter name 'ignore_potentially_invalid_splitter_warning' is very long and could be shortened to something like 'ignore_validation_warning' or 'suppress_warnings' for better readability.
ignore_potentially_invalid_splitter_warning
This file contains hidden or 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
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.
…s. Closes #121