Skip to content

test(workflow-operator): add unit tests for SklearnModelOpDesc - #6665

Merged
aglinxinyuan merged 1 commit into
apache:mainfrom
Ma77Ball:test/sklearn-model-op-desc-spec
Jul 22, 2026
Merged

test(workflow-operator): add unit tests for SklearnModelOpDesc#6665
aglinxinyuan merged 1 commit into
apache:mainfrom
Ma77Ball:test/sklearn-model-op-desc-spec

Conversation

@Ma77Ball

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Add SklearnModelOpDescSpec using a minimal concrete subclass of the abstract descriptor.
  • Verify the countVectorizer and tfidfTransformer flags default to false.
  • Verify getOutputSchemas keys the single output by the output port id and produces exactly model_name STRING and model BINARY, independent of input schemas.

Any related issues, documentation, discussions?

Closes: #6664

How was this PR tested?

  • Run: sbt "WorkflowOperator/testOnly *SklearnModelOpDescSpec", expect all 4 tests passing.
  • Test-only change; no production code is modified.

Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.8 in compliance with ASF

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@codecov-commenter

codecov-commenter commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.65%. Comparing base (0467c76) to head (69d5d05).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6665   +/-   ##
=========================================
  Coverage     74.65%   74.65%           
  Complexity     3438     3438           
=========================================
  Files          1160     1160           
  Lines         45793    45793           
  Branches       5069     5069           
=========================================
  Hits          34189    34189           
  Misses         9953     9953           
  Partials       1651     1651           
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 76.76% <ø> (ø) Carriedforward from 0467c76
amber 66.81% <ø> (ø)
computing-unit-managing-service 18.00% <ø> (ø)
config-service 66.66% <ø> (ø)
file-service 66.80% <ø> (ø)
frontend 78.56% <ø> (ø) Carriedforward from 0467c76
notebook-migration-service 78.94% <ø> (ø)
pyamber 91.99% <ø> (ø) Carriedforward from 0467c76
workflow-compiling-service 55.14% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 0 better · 🔴 8 worse · ⚪ 7 noise (<±5%) · 0 without baseline

Compared against main 0467c76 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 443 0.271 21,919/28,549/28,549 us 🔴 +15.5% / 🔴 +82.6%
🔴 bs=100 sw=10 sl=64 921 0.562 105,795/157,352/157,352 us 🔴 +23.2% / 🔴 +48.5%
bs=1000 sw=10 sl=64 1,090 0.665 917,304/948,914/948,914 us ⚪ within ±5% / 🟢 -9.5%
Baseline details

Latest main 0467c76 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 443 tuples/sec 492 tuples/sec 767.23 tuples/sec -10.0% -42.3%
bs=10 sw=10 sl=64 MB/s 0.271 MB/s 0.301 MB/s 0.468 MB/s -10.0% -42.1%
bs=10 sw=10 sl=64 p50 21,919 us 18,977 us 12,705 us +15.5% +72.5%
bs=10 sw=10 sl=64 p95 28,549 us 29,918 us 15,633 us -4.6% +82.6%
bs=10 sw=10 sl=64 p99 28,549 us 29,918 us 20,214 us -4.6% +41.2%
bs=100 sw=10 sl=64 throughput 921 tuples/sec 974 tuples/sec 1,001 tuples/sec -5.4% -8.0%
bs=100 sw=10 sl=64 MB/s 0.562 MB/s 0.595 MB/s 0.611 MB/s -5.5% -8.0%
bs=100 sw=10 sl=64 p50 105,795 us 99,844 us 99,949 us +6.0% +5.8%
bs=100 sw=10 sl=64 p95 157,352 us 127,727 us 105,996 us +23.2% +48.5%
bs=100 sw=10 sl=64 p99 157,352 us 127,727 us 117,999 us +23.2% +33.4%
bs=1000 sw=10 sl=64 throughput 1,090 tuples/sec 1,104 tuples/sec 1,033 tuples/sec -1.3% +5.5%
bs=1000 sw=10 sl=64 MB/s 0.665 MB/s 0.674 MB/s 0.631 MB/s -1.3% +5.5%
bs=1000 sw=10 sl=64 p50 917,304 us 911,050 us 974,571 us +0.7% -5.9%
bs=1000 sw=10 sl=64 p95 948,914 us 944,008 us 1,016,467 us +0.5% -6.6%
bs=1000 sw=10 sl=64 p99 948,914 us 944,008 us 1,048,798 us +0.5% -9.5%
Raw CSV
config_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,451.13,200,128000,443,0.271,21919.05,28549.22,28549.22
1,100,10,64,20,2172.26,2000,1280000,921,0.562,105795.00,157352.09,157352.09
2,1000,10,64,20,18349.09,20000,12800000,1090,0.665,917304.47,948913.67,948913.67

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds ScalaTest unit coverage for SklearnModelOpDesc (a shared abstract sklearn operator descriptor in common/workflow-operator) to lock in its default flag values and its fixed output-schema contract, as requested in #6664.

Changes:

  • Introduces SklearnModelOpDescSpec with a minimal concrete subclass to instantiate the abstract descriptor.
  • Asserts countVectorizer and tfidfTransformer default to false.
  • Verifies getOutputSchemas always returns exactly one output keyed by the output port id, with model_name: STRING and model: BINARY, independent of input schemas.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Jul 22, 2026
Merged via the queue into apache:main with commit 6ab43b4 Jul 22, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit test coverage for SklearnModelOpDesc

4 participants