Ensure output of classifier predict has aligned index - #8056
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (10)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR enhances the classification prediction pipeline to preserve and propagate index metadata through prediction outputs. The ChangesIndex Propagation Through Classification Pipeline
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
csadorf
left a comment
There was a problem hiding this comment.
I agree that we should try to lift some of the churn into the reflect decorator in the future.
LGTM!
|
/merge |
When returning pandas/cudf outputs, we want the index of the output to be aligned with the index of the input. This PR plumbs through
indexindecode_labels, adds a test for all classifiers, then applies the necessary fixes and plumbing so the output has an aligned index.In the long run I hope to move index alignment handling to the
reflectdecorator so method code doesn't need to worry about this, but for now this is the most idiomatic and cleanest solution.Split out and expanded from #8039.