Ma77Ball opened a new pull request, #6048: URL: https://github.com/apache/texera/pull/6048
### What changes were proposed in this PR? - Add abstract `SklearnModelOpDesc extends PythonOperatorDescriptor` holding the four shared config fields (`target`, `countVectorizer`, `text`, `tfidfTransformer`) with their Jackson/JSON-schema annotations, the two `@JsonIgnore` hooks (`getImportStatements`, `getUserFriendlyModelName`), and the shared `getOutputSchemas`. - Change `SklearnClassifierOpDesc` and `SklearnTrainingOpDesc` to extend the new base, so each keeps only what genuinely differs (`generatePythonCode`, `operatorInfo`), removing ~50 lines of copy-pasted, drift-prone code. - The 51 leaf subclasses inherit the fields unchanged, so the generated operator schema is identical (no behavior change). ### Any related issues, documentation, discussions? Closes: #6038 ### How was this PR tested? - Pure refactor with no behavior change; covered by existing `SklearnOpDescRegistrySpec`, which instantiates a leaf classifier, sets the inherited `target`/`countVectorizer` fields, and asserts on `generatePythonCode()` output. Run it in CI via `sbt "WorkflowOperator/jacoco"`, expect the Sklearn registry specs green. - Verified locally with `sbt "WorkflowOperator/Test/compile"` (compiles clean; both descriptors resolve against `SklearnModelOpDesc`). - Note: `sbt "WorkflowOperator/testOnly *SklearnOpDescRegistrySpec"` could not run locally because sbt-jacoco offline-instruments the Test classpath and JaCoCo 0.8.11 fails to instrument the vendored `JsonSchemaDraft.class` on this JDK (pre-existing tooling issue, unrelated to this change); the spec runs in CI under the `WorkflowOperator/jacoco` job. ### Was this PR authored or co-authored using generative AI tooling? Co-authored with Claude Opus 4.8 in compliance with ASF -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
