Skip to content

feat(workflow-operator): constrain the Sklearn text column, and drop what an estimator cannot fit - #7645

Open
kz930 wants to merge 1 commit into
apache:mainfrom
kz930:feat/sklearn-config-constraints
Open

feat(workflow-operator): constrain the Sklearn text column, and drop what an estimator cannot fit#7645
kz930 wants to merge 1 commit into
apache:mainfrom
kz930:feat/sklearn-config-constraints

Conversation

@kz930

@kz930 kz930 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Two configurations ended the run with an error from inside scikit-learn or from code generation, naming neither the column nor the field to change.

The text column now states what it takes. Count Vectorizer tokenizes documents, so the column is a string, and it is required exactly when that switch is on: with the switch off nothing reads it, and with the switch on a blank one reached code generation as a null and became #EXCEPTION DURING CODE GENERATION. Both are schema constraints, the second in the conditional form Aggregate already uses, so the panel refuses the configuration while it is being written. Conditional rather than a plain required, so a freshly dropped operator, whose vectorizer is off, is not flagged for a field it has no use for.

The feature set drops what it cannot fit rather than ending the run. These operators take every column but the target, so a text column beside the numbers, one the user never meant as a feature, raised ValueError: could not convert string to float, and a timestamp raised DTypePromotionError. Nothing in the configuration could exclude it, and the message named neither the column nor a way out. Booleans are kept, fitting as 0/1. What was left out is printed, so the choice is visible rather than silent, and this follows the rest of the codebase, where twenty-four visualization operators drop missing values before plotting.

The drop is skipped under the text pipeline, where X is one string column by construction and filtering would empty it.

The constraints sit on the shared base, so they reach all fifty-one operators of the Sklearn and Sklearn Training groups. The required marker for the text column needs #7642; without it the configuration is still refused, only unmarked.

Any related issues, documentation, discussions?

Closes #7643. The marker for the new conditional required comes from #7642.

How was this PR tested?

SklearnClassifierOpDescCodegenSpec and SklearnTrainingOpDescCodegenSpec already pinned the generated feature-selection line and were updated to the new one, including that the text pipeline does not carry it. WorkflowOperator/test passes: 2387 tests.

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

Generated-by: Claude Code (Claude Opus 5)

…what an estimator cannot fit

Two configurations ended the run with an error from inside scikit-learn or from
code generation, naming neither the column nor the field to change.

The text column now states what it takes. Count Vectorizer tokenizes documents,
so the column is a string, and it is required exactly when that switch is on:
with the switch off nothing reads it, and with the switch on a blank one reached
code generation as a null and became #EXCEPTION DURING CODE GENERATION. Both are
schema constraints, the second in the conditional form Aggregate already uses, so
the panel refuses the configuration while it is being written. Conditional rather
than a plain required, so a freshly dropped operator, whose vectorizer is off, is
not flagged for a field it has no use for.

The feature set drops what it cannot fit rather than ending the run. These
operators take every column but the target, so a text column beside the numbers,
one the user never meant as a feature, raised ValueError: could not convert string
to float, and a timestamp raised DTypePromotionError. Nothing in the configuration
could exclude it and the message named neither the column nor a way out. Booleans
are kept, fitting as 0/1. What was left out is printed, so the choice is visible
rather than silent, and this follows the rest of the codebase, where twenty-four
visualization operators drop missing values before plotting.

The drop is skipped under the text pipeline, where X is one string column by
construction and filtering would empty it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@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:

  • Contributors with relevant context: @Ma77Ball, @eugenegujing
    You can notify them by mentioning @Ma77Ball, @eugenegujing in a comment.

@codecov-commenter

codecov-commenter commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (12169c2) to head (1134fd8).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7645      +/-   ##
============================================
- Coverage     89.65%   89.65%   -0.01%     
  Complexity     4397     4397              
============================================
  Files          1177     1177              
  Lines         46996    46994       -2     
  Branches       5268     5266       -2     
============================================
- Hits          42136    42134       -2     
  Misses         3094     3094              
  Partials       1766     1766              
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 98.62% <ø> (ø) Carriedforward from 12169c2
amber 86.35% <ø> (-0.01%) ⬇️ Carriedforward from 12169c2
computing-unit-managing-service 72.46% <ø> (ø)
config-service 77.31% <ø> (ø)
file-service 68.90% <ø> (ø) Carriedforward from 12169c2
frontend 90.67% <ø> (ø) Carriedforward from 12169c2
notebook-migration-service 78.89% <ø> (ø)
pyamber 97.57% <ø> (ø) Carriedforward from 12169c2
workflow-compiling-service 57.89% <ø> (ø)

*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

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

Compared against main 12169c2 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 409 0.249 22,017/35,101/35,101 us 🔴 -15.0% / 🔴 +114.7%
🟢 bs=100 sw=10 sl=64 955 0.583 103,395/118,251/118,251 us 🟢 -12.8% / 🔴 +9.9%
🔴 bs=1000 sw=10 sl=64 1,093 0.667 906,607/1,000,983/1,000,983 us 🔴 +6.8% / 🟢 -8.6%
Baseline details

Latest main 12169c2 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 409 tuples/sec 480 tuples/sec 774.89 tuples/sec -14.8% -47.2%
bs=10 sw=10 sl=64 MB/s 0.249 MB/s 0.293 MB/s 0.473 MB/s -15.0% -47.4%
bs=10 sw=10 sl=64 p50 22,017 us 20,334 us 12,738 us +8.3% +72.8%
bs=10 sw=10 sl=64 p95 35,101 us 32,373 us 16,348 us +8.4% +114.7%
bs=10 sw=10 sl=64 p99 35,101 us 32,373 us 18,848 us +8.4% +86.2%
bs=100 sw=10 sl=64 throughput 955 tuples/sec 973 tuples/sec 1,005 tuples/sec -1.8% -4.9%
bs=100 sw=10 sl=64 MB/s 0.583 MB/s 0.594 MB/s 0.613 MB/s -1.9% -4.9%
bs=100 sw=10 sl=64 p50 103,395 us 100,742 us 100,970 us +2.6% +2.4%
bs=100 sw=10 sl=64 p95 118,251 us 135,608 us 107,605 us -12.8% +9.9%
bs=100 sw=10 sl=64 p99 118,251 us 135,608 us 116,429 us -12.8% +1.6%
bs=1000 sw=10 sl=64 throughput 1,093 tuples/sec 1,120 tuples/sec 1,030 tuples/sec -2.4% +6.1%
bs=1000 sw=10 sl=64 MB/s 0.667 MB/s 0.684 MB/s 0.629 MB/s -2.5% +6.1%
bs=1000 sw=10 sl=64 p50 906,607 us 891,133 us 991,433 us +1.7% -8.6%
bs=1000 sw=10 sl=64 p95 1,000,983 us 937,645 us 1,036,668 us +6.8% -3.4%
bs=1000 sw=10 sl=64 p99 1,000,983 us 937,645 us 1,070,470 us +6.8% -6.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,489.47,200,128000,409,0.249,22016.74,35100.53,35100.53
1,100,10,64,20,2094.98,2000,1280000,955,0.583,103395.03,118250.99,118250.99
2,1000,10,64,20,18291.88,20000,12800000,1093,0.667,906607.39,1000983.27,1000983.27

@kz930

kz930 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@Ma77Ball @carloea2 May you take a look at it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sklearn operators end the run on two configurations they could refuse or handle

2 participants