Skip to content

fix(workflow-operator): report a clear error when a configured HF image/audio column is missing - #7299

Merged
xuang7 merged 5 commits into
apache:mainfrom
PG1204:fix/hf-missing-column-error
Aug 10, 2026
Merged

xuang7 merged 5 commits into
apache:mainfrom
PG1204:fix/hf-missing-column-error

Conversation

@PG1204

@PG1204 PG1204 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

If the HuggingFace operator's Input Image Column (or Input Audio Column) named a column that doesn't exist in the input table, use_image_column / use_audio_column silently 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; PythonCodeRawInvalidTextSpec py-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.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. release/* labels drive the post-merge backport, so add or remove one to change where this fix lands.

Release branch Analysis
⚠️ release/v1.2 Not labeled automatically — none of the files this PR modifies exist on this branch (common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/huggingFace/codegen/HuggingFaceCodegenBase.scala, common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/huggingFace/HuggingFaceInferenceOpDescSpec.scala). The fix may target code that isn't on this release, or the files were moved/renamed after the branch was cut. Please check and add release/v1.2 by hand if this fix should be backported here.

Auto-label run.

@github-actions

github-actions Bot commented Aug 3, 2026

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 Aug 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.44%. Comparing base (114a610) to head (88dacb0).

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           
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 85.50% <ø> (ø) Carriedforward from e30eb17
amber 80.88% <ø> (ø)
computing-unit-managing-service 50.72% <ø> (ø)
config-service 65.97% <ø> (ø)
file-service 69.05% <ø> (ø)
frontend 88.11% <ø> (ø) Carriedforward from e30eb17
notebook-migration-service 78.89% <ø> (ø)
pyamber 97.55% <ø> (+0.04%) ⬆️ Carriedforward from e30eb17
workflow-compiling-service 26.31% <ø> (ø)

*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

github-actions Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 114a610 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 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

@PG1204

PG1204 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/request-review @xuang7

@github-actions
github-actions Bot requested a review from xuang7 August 5, 2026 20:43
@xuang7
xuang7 added this pull request to the merge queue Aug 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 7, 2026
…mn-error

# Conflicts:
#	common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/huggingFace/HuggingFaceInferenceOpDescSpec.scala
@PG1204
PG1204 requested a review from xuang7 August 7, 2026 01:41
@chenlica

chenlica commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@PG1204 Screenshots?

@PG1204

PG1204 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@PG1204 Screenshots?

hi @chenlica
so there isn't a natural UI screenshot here, Input Image Column is an autofill dropdown, so the client only offers existing columns and clears the reference once its column disappears and a "configured-but-missing" column can't be held in the GUI. The improved error is a runtime message that surfaces when the operator executes with such a config (headless/API/scheduled runs, or a stored workflow whose upstream schema changed).

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…"):
image

@chenlica

chenlica commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@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.

@PG1204

PG1204 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@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
image
Before/after of the error message for an image task (image-to-text) whose Input Image Column is set to a column that isn't in the input (img, while the input table has only prompt), with no image upload.

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).

@xuang7
xuang7 added this pull request to the merge queue Aug 10, 2026
Merged via the queue into apache:main with commit 133da7b Aug 10, 2026
31 checks passed
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.

HuggingFace inference operator: a mistyped image/audio column gives a misleading "No image source" error

4 participants