The GitHub Actions job "Benchmarks" on texera.git/main has succeeded. Run started by GitHub user github-merge-queue[bot] (triggered by github-merge-queue[bot]).
Head commit for run: b94d04ddbadcd2cf55b792f1f6b6260122231341 / Xinyuan Lin <[email protected]> test(workflow-operator): share the sklearn spec template (#9202) ### What changes were proposed in this PR? The 51 per-model sklearn descriptor specs (25 classifiers, 26 training-only descriptors) each repeated the same five tests. A new test trait, `SklearnModelOpDescBehaviors`, registers them. Each spec now makes one `sklearnClassifier(...)` or `sklearnTrainer(...)` call with its own `operatorType`, model name and sklearn import written out as literals. | Surface | Pinned | | --- | --- | | `operatorInfo` | name, description, group, input port names, one blocking output | | config defaults | `countVectorizer`, `tfidfTransformer`, `target`, `text` | | `getOutputSchemas` | `model_name` STRING and `model` BINARY on the declared output port | | `generatePythonCode` | the estimator import, `make_pipeline`, the model name | | JSON | the `operatorType` discriminator and a round-trip through `LogicalOp` | Test names are unchanged (`<Descriptor>[.<member>] should ...`). The seven specs with extra tests (the naive Bayes family and the decision tree) keep them. Expected values stay literal in each spec, including the `operatorType` that saved workflows persist, so a renamed model, a changed import or a changed `operatorType` still fails that model's own spec, while a descriptor class can still be renamed under its persisted name. `sklearnClassifier` only accepts a `SklearnClassifierOpDesc` and `sklearnTrainer` only a `SklearnTrainingOpDesc`, so a descriptor cannot be checked against the wrong family's ports and group. ### Any related issues, documentation, discussions? Closes #9201. ### How was this PR tested? - `sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.sklearn.*"`: 58 suites, 431 tests pass. These are the same 431 test names as on main, compared from the JUnit XML reports before and after. - Mutation check: a wrong model name in `SklearnBaggingOpDescSpec` fails its `operatorInfo` and `generatePythonCode` tests, a wrong `operatorType` there fails only its round-trip test, and a wrong import in `SklearnTrainingKNNOpDescSpec` fails its `generatePythonCode` test; the other tests in those specs pass. - `sbt "WorkflowOperator/Test/scalafmtCheck" "WorkflowOperator/Test/scalafix --check"` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) Report URL: https://github.com/apache/texera/actions/runs/41028189855 With regards, GitHub Actions via GitBox
