Repository navigation
fix(workflow-operator): report a clear error when a configured HF image/audio column is missing - #7299
Conversation
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7299 +/- ##
=========================================
Coverage 85.43% 85.44%
Complexity 4150 4150
=========================================
Files 1169 1169
Lines 46740 46740
Branches 5202 5202
=========================================
+ Hits 39934 39936 +2
+ Misses 5092 5090 -2
Partials 1714 1714
*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 | 420 | 0.256 | 23,223/30,296/30,296 us | 🔴 +12.7% / 🔴 +84.8% |
| 🔴 | bs=100 sw=10 sl=64 | 889 | 0.543 | 111,060/140,933/140,933 us | 🟢 -12.2% / 🔴 +25.3% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,077 | 0.657 | 912,376/1,074,213/1,074,213 us | 🔴 +11.9% / 🟢 -11.8% |
Baseline details
Latest main 114a610 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 420 tuples/sec | 471 tuples/sec | 743.73 tuples/sec | -10.8% | -43.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.256 MB/s | 0.287 MB/s | 0.454 MB/s | -10.8% | -43.6% |
| bs=10 sw=10 sl=64 | p50 | 23,223 us | 20,613 us | 13,130 us | +12.7% | +76.9% |
| bs=10 sw=10 sl=64 | p95 | 30,296 us | 31,558 us | 16,391 us | -4.0% | +84.8% |
| bs=10 sw=10 sl=64 | p99 | 30,296 us | 31,558 us | 19,408 us | -4.0% | +56.1% |
| bs=100 sw=10 sl=64 | throughput | 889 tuples/sec | 886 tuples/sec | 944.04 tuples/sec | +0.3% | -5.8% |
| bs=100 sw=10 sl=64 | MB/s | 0.543 MB/s | 0.541 MB/s | 0.576 MB/s | +0.4% | -5.8% |
| bs=100 sw=10 sl=64 | p50 | 111,060 us | 104,818 us | 105,853 us | +6.0% | +4.9% |
| bs=100 sw=10 sl=64 | p95 | 140,933 us | 160,585 us | 112,493 us | -12.2% | +25.3% |
| bs=100 sw=10 sl=64 | p99 | 140,933 us | 160,585 us | 122,200 us | -12.2% | +15.3% |
| bs=1000 sw=10 sl=64 | throughput | 1,077 tuples/sec | 1,108 tuples/sec | 972.22 tuples/sec | -2.8% | +10.8% |
| bs=1000 sw=10 sl=64 | MB/s | 0.657 MB/s | 0.676 MB/s | 0.593 MB/s | -2.8% | +10.7% |
| bs=1000 sw=10 sl=64 | p50 | 912,376 us | 896,043 us | 1,033,856 us | +1.8% | -11.8% |
| bs=1000 sw=10 sl=64 | p95 | 1,074,213 us | 959,779 us | 1,076,083 us | +11.9% | -0.2% |
| bs=1000 sw=10 sl=64 | p99 | 1,074,213 us | 959,779 us | 1,107,701 us | +11.9% | -3.0% |
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,475.98,200,128000,420,0.256,23223.36,30296.34,30296.34
1,100,10,64,20,2249.52,2000,1280000,889,0.543,111059.61,140932.73,140932.73
2,1000,10,64,20,18570.59,20000,12800000,1077,0.657,912375.68,1074212.68,1074212.68|
/request-review @xuang7 |
…mn-error # Conflicts: # common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/huggingFace/HuggingFaceInferenceOpDescSpec.scala
|
@PG1204 Screenshots? |
hi @chenlica this is reproduced by running the operator's generated Python against an input missing the configured column (old message was the misleading "No image source…"): |
|
@PG1204 Any reasonable screenshot that can improve the readability of the PR will be appreciated. If you don't think that's doable, that's fine. |
@chenlica both sides are the operator's real generated Python run against the same input with the same config Before: Image task configuration error: No image source. Set an Input Image Column or upload an image. This is misleading, since a column was set. After (this PR): Image task configuration error: Input Image Column 'img' not found in the input table. Available columns: ['prompt'], which names the missing column and lists the available ones. Captured by running the operator's generated Python headlessly against a one-column table (this state is reached via API/headless/stored-workflow execution; the GUI clears out-of-schema column references, so it isn't reproducible by clicking through the editor). |


What changes were proposed in this PR?
If the HuggingFace operator's
Input Image Column(orInput Audio Column) named a column that doesn't exist in the input table,use_image_column/use_audio_columnsilently became false and the user got the misleading "No image source. Set an Input Image Column or upload an image.", even though they had set one, just misspelled it.This distinguishes the two cases: at that point there's no upload and the column resolved to false, which when a column name is actually configured, can only mean it isn't in the table. So a non-empty configured column now produces a clear "Input Image Column '' not found in the input table. Available columns: [...]" error instead of the generic "No image source" message. Same for audio.
Any related issues, documentation, discussions?
Closes #7197.
How was this PR tested?
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.huggingFace.* org.apache.texera.amber.util.PythonCodeRawInvalidTextSpec": passes (126 tests). Added a test asserting the generated script produces the "Input Image/Audio Column '...' not found" errors;PythonCodeRawInvalidTextSpecpy-compiles the generated Python (guards the added nested indentation). scalafmt clean.Was this PR authored or co-authored using generative AI tooling?
This PR was co-authored with Claude Opus 4.8 in compliance with ASF policy.