Repository navigation
feat(workflow-operator): name the missing ground-truth column in Sklearn Prediction's error - #8918
Conversation
…arn Prediction's error A ground-truth name that is not in the data input failed compilation with None.get. Say which column is missing instead, in the wording MachineLearningScorer already uses. Closes apache#8864 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8918 +/- ##
============================================
- Coverage 92.30% 92.30% -0.01%
Complexity 5046 5046
============================================
Files 1260 1259 -1
Lines 53887 53824 -63
Branches 6711 6703 -8
============================================
- Hits 49743 49682 -61
+ Misses 2486 2485 -1
+ Partials 1658 1657 -1
*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:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 404 | 0.246 | 24,045/33,080/33,080 us | 🔴 -8.2% / 🔴 +126.5% |
| 🔴 | bs=100 sw=10 sl=64 | 931 | 0.568 | 106,771/122,720/122,720 us | 🔴 +8.3% / 🔴 +22.5% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,076 | 0.657 | 918,864/1,039,275/1,039,275 us | 🔴 +8.0% / 🔴 +12.4% |
Baseline details
Latest main 7426431 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 404 tuples/sec | 439 tuples/sec | 912.36 tuples/sec | -8.0% | -55.7% |
| bs=10 sw=10 sl=64 | MB/s | 0.246 MB/s | 0.268 MB/s | 0.557 MB/s | -8.2% | -55.8% |
| bs=10 sw=10 sl=64 | p50 | 24,045 us | 22,705 us | 11,391 us | +5.9% | +111.1% |
| bs=10 sw=10 sl=64 | p95 | 33,080 us | 32,658 us | 14,608 us | +1.3% | +126.5% |
| bs=10 sw=10 sl=64 | p99 | 33,080 us | 32,658 us | 17,250 us | +1.3% | +91.8% |
| bs=100 sw=10 sl=64 | throughput | 931 tuples/sec | 988 tuples/sec | 1,161 tuples/sec | -5.8% | -19.8% |
| bs=100 sw=10 sl=64 | MB/s | 0.568 MB/s | 0.603 MB/s | 0.709 MB/s | -5.8% | -19.9% |
| bs=100 sw=10 sl=64 | p50 | 106,771 us | 101,358 us | 91,471 us | +5.3% | +16.7% |
| bs=100 sw=10 sl=64 | p95 | 122,720 us | 113,323 us | 100,192 us | +8.3% | +22.5% |
| bs=100 sw=10 sl=64 | p99 | 122,720 us | 113,323 us | 119,565 us | +8.3% | +2.6% |
| bs=1000 sw=10 sl=64 | throughput | 1,076 tuples/sec | 1,094 tuples/sec | 1,226 tuples/sec | -1.6% | -12.2% |
| bs=1000 sw=10 sl=64 | MB/s | 0.657 MB/s | 0.668 MB/s | 0.748 MB/s | -1.6% | -12.2% |
| bs=1000 sw=10 sl=64 | p50 | 918,864 us | 920,734 us | 887,282 us | -0.2% | +3.6% |
| bs=1000 sw=10 sl=64 | p95 | 1,039,275 us | 962,200 us | 924,352 us | +8.0% | +12.4% |
| bs=1000 sw=10 sl=64 | p99 | 1,039,275 us | 962,200 us | 951,858 us | +8.0% | +9.2% |
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,495.54,200,128000,404,0.246,24044.93,33080.15,33080.15
1,100,10,64,20,2147.34,2000,1280000,931,0.568,106770.55,122719.88,122719.88
2,1000,10,64,20,18591.45,20000,12800000,1076,0.657,918864.07,1039274.84,1039274.84
carloea2
left a comment
There was a problem hiding this comment.
One regression reproduced on this head with a passing exact-case control.
…klearn Prediction Schema lookups ignore case, but the generated drop() does not, so a case-only match passed validation and then raised KeyError at runtime. Co-Authored-By: Claude Opus 5.5 <[email protected]>
carloea2
left a comment
There was a problem hiding this comment.
The case-only mismatch is now rejected before Python execution. All 17 SklearnPredictionOpDescSpec tests pass locally, including the exact-case control. The remaining macOS CI failure is in LoopIntegrationSpec; CI still needs to pass before merge.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… into kary-integration
…way the engine does (apache#9035) ### What changes were proposed in this PR? The engine looks a column up through `Schema`, which ignores case. So a setting that names `Name` reads the column `name`, and the workflow runs in Texera. The exported script indexed the pandas frame with the name as written and stopped with a `KeyError`. `StandaloneCodeGenerator` gains `columnAsStored`, which resolves a setting's column name against the input schema and returns the table's spelling. A name the schema does not hold comes back unchanged, so the script still fails where the run would. Seven operators read their column through it: Projection, Filter, Keyword Search, Regular Expression, Substring Search, Dictionary Matcher and Unnest String. Projection still names each output column by its alias, which falls back to the name as the setting writes it. That matches `ProjectionOpExec`. Type Casting is the exception. Its schema propagation and its executor both match the column by its exact name, so in the engine a unit whose column differs in case casts nothing and the column passes through unchanged. The export now skips that unit too, instead of raising a `KeyError`. Operators that run as Python in the engine already compare names exactly on both sides, so they are left alone. ### Any related issues, documentation, discussions? Closes apache#9004. @carloea2 found the mismatch while reviewing apache#8918. apache#8980 rewrites Filter's export and looks up the declared type by the column's name. Whichever of the two merges second should look that type up under the resolved name as well. ### How was this PR tested? Each of the eight operators' `OpDescSpec` gains a test with a setting in a different case from the table. It asserts that the generated code reads the table's spelling. For Type Casting, the test also checks that the engine's output schema leaves that column's type unchanged, and that the export skips the unit. All of `WorkflowOperator/test` passes. Merged with the other open export PRs, the verification suite still passes all 150 cases (3 ignored, as before). ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What changes were proposed in this PR?
When Sklearn Prediction's "Ground Truth Attribute Name to Ignore" names a column that is not in the data input, compilation failed with
java.util.NoSuchElementException: None.get, which does not tell the user what is wrong. It now fails with "Ground Truth column '' is not in the input table", the same wording MachineLearningScorer uses for its columns.Any related issues, documentation, discussions?
Closes #8864
How was this PR tested?
Updated the existing test in
SklearnPredictionOpDescSpecto check the new message.sbt "WorkflowOperator/testOnly *SklearnPredictionOpDescSpec"passes, and so do scalafmt and scalafix.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
🤖 Generated with Claude Code