Repository navigation
Conversation
Pair numeric validation and target-type detection with focused regression tests. This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
Preserve the NumPy cache where supported and verify the uncached StringDType fallback. This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
Include round trips, unknown and mixed representations, and long strings with explicit category order. This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
Pair NaN validation and category discovery with sentinel, inverse-index, and count tests. This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
Add metrics, model-selection, classification, ensemble and wrapper regression coverage without temporary expected failures. This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
Include nested-scope, exception, thread, copied-context, mutation and Array API regression tests. This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
Integrate the scoped cache into target checks and metrics, including value-preserving reshapes and regression tests. This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
Include isolated workers, operation-stage measurements, object-conversion comparisons and memory interpretation guidance. This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
|
Thank you for opening your first pull request to scikit-learn! 🎉 To help get your contribution reviewed, please make sure that:
|
This pull request includes code written with the assistance of AI. The code has not yet been reviewed by a human.
virchan
left a comment
There was a problem hiding this comment.
Thanks for the PR, @lcrmorin.
I'm closing this and suggesting that the work be split into smaller PRs, for two reasons:
-
It doesn't follow the plan we agreed on in #34946. The plan was a tests-only PR first, followed by small, separate PRs for the fixes. This PR updates 35 files, which makes it much harder to review than the same work split into pieces.
-
The caching change in
sklearn/utils/_unique.pyintroduces more complexity than we agreed to take on. A change like this needs its own discussion in the issue before implementation.
To be clear, this isn't a rejection of StringDType support; that's still wanted. I suggest starting with the small tests-only PR from the original plan.
Smaller PRs also tend to get reviewed much faster, which is why our Contributing Guide recommends starting with them. The existing branch can stay available as a reference, so none of the work is lost.
Reference Issues/PRs
Addresses #34946.
What does this implement/fix? Explain your changes.
Add support for NumPy
StringDType.Main issues were:
StringDTypebeing sent to numeric estimator and not being sent to some categorical estimators).StringDType. Solution was to have a generic cache approach. Feels a bit weird this is not handled on numpy side.Detailed changes
Line counts include additions (+) and removals (−). Test fixtures count as tests.
Overall the commits are relatively simple. I reviewed them all. Most of the volume is test / benchmark.
The tricky part would be the type meta data caching part. Proper working needed to be ensured. The cache expires after each read-only operation, including on exceptions and when Python contexts are copied. Inputs must not be mutated within a scope. Native NumPy discovery and existing string mapping are preserved; no automatic object conversion is introduced.
Validation and performance
AI usage disclosure
I used AI assistance for code generation, test/benchmark generation, documentation, and research and understanding. Except for the commit messages in the first 25 commits local branch, all messages to other devs are rewritten.
This pull request includes code written with the assistance of AI.
The code changes were largely reviewed by a human.