Repository navigation
test(workflow-operator): share the sklearn spec template - #9202
Open
aglinxinyuan wants to merge 2 commits into
Open
aglinxinyuan wants to merge 2 commits into
aglinxinyuan wants to merge 2 commits into
Conversation
The 51 per-model sklearn descriptor specs each repeated the same five tests. SklearnModelOpDescBehaviors now registers them, and each spec passes its own literal model name and sklearn import. Test names and assertions are unchanged; the specs with extra tests keep them.
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9202 +/- ##
=========================================
Coverage 91.98% 91.98%
Complexity 5083 5083
=========================================
Files 1285 1285
Lines 56094 56094
Branches 7137 7137
=========================================
Hits 51599 51599
Misses 2742 2742
Partials 1753 1753
*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:
|
Contributor
✅ No material benchmark regressions detected🟢 4 better · 🔴 0 worse · ⚪ 11 noise (<±5%) · 0 without baseline
Baseline detailsLatest main
Raw CSVconfig_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,453.96,200,128000,441,0.269,21589.13,30355.77,30355.77
1,100,10,64,20,2094.13,2000,1280000,955,0.583,101355.31,151456.96,151456.96
2,1000,10,64,20,17280.97,20000,12800000,1157,0.706,862756.23,917989.17,917989.17 |
This branch has not been deployed
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?
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 onesklearnClassifier(...)orsklearnTrainer(...)call with its own model name and sklearn import written out as literals.operatorInfocountVectorizer,tfidfTransformer,target,textgetOutputSchemasmodel_nameSTRING andmodelBINARY on the declared output portgeneratePythonCodemake_pipeline, the model nameoperatorTypediscriminator and a round-trip throughLogicalOpTest 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, so a renamed model or a changed import still fails that model's own spec.sklearnClassifieronly accepts aSklearnClassifierOpDescandsklearnTraineronly aSklearnTrainingOpDesc, 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.SklearnBaggingOpDescSpecfails itsoperatorInfoandgeneratePythonCodetests, and a wrong import inSklearnTrainingKNNOpDescSpecfails itsgeneratePythonCodetest; the other tests in both 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)