fix(LogicalOp, v1.2): register SklearnLogisticRegression(CV) subtypes exactly once - #7005
Open
Yicong-Huang wants to merge 1 commit into
Open
Conversation
…ly once (#6808) ### What changes were proposed in this PR? `LogicalOp`'s `@JsonSubTypes` registered `SklearnLogisticRegressionOpDesc` and `SklearnLogisticRegressionCVOpDesc` **twice each** (two separate active `new Type(...)` pairs). Any consumer that enumerates `@JsonSubTypes.value()` — operator discovery, metadata/schema generation, the operator palette — therefore saw each of these two operators twice. This PR removes the duplicate pair, keeping exactly one registration of each: ```diff - new Type(value = classOf[SklearnLogisticRegressionOpDesc], name = "SklearnLogisticRegression"), - new Type( - value = classOf[SklearnLogisticRegressionCVOpDesc], - name = "SklearnLogisticRegressionCV" - ), ``` ### Any related issues, documentation, discussions? Closes #6793 ### How was this PR tested? Added a `LogicalOpSpec` regression test that reads the `@JsonSubTypes` annotation and asserts no subtype **class** or **name** is registered more than once. Verified the test **fails** on the pre-fix (duplicated) registry and **passes** after the fix; full `LogicalOpSpec` is green (5/5). ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.8) --------- (backported from commit e81ba0e) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v1.2 #7005 +/- ##
==================================================
- Coverage 53.95% 52.39% -1.56%
- Complexity 1441 2493 +1052
==================================================
Files 809 1077 +268
Lines 34144 42267 +8123
Branches 3448 4548 +1100
==================================================
+ Hits 18421 22145 +3724
- Misses 14815 18815 +4000
- Partials 908 1307 +399
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What changes were proposed in this PR?
Backport of #6808 to
release/v1.2, cherry-picked from e81ba0e.Source fix only. The test changes from #6808 were omitted: the touched test spec(s) do not exist on
release/v1.2(or depend on main-only test infrastructure), so backporting them cleanly is not possible. Only the source fix is carried over, per maintainer guidance.Any related issues, documentation, discussions?
Backport of #6808. Originally linked #6793.
How was this PR tested?
Release-branch CI runs on this PR. The source change cherry-picked cleanly; test changes were intentionally dropped (see above).
Was this PR authored or co-authored using generative AI tooling?
Yes — backport prepared with Claude Code (mechanical cherry-pick + conflict resolution; the change itself is #6808 by its original author).
🤖 Generated with Claude Code