PG1204 opened a new pull request, #7585:
URL: https://github.com/apache/texera/pull/7585

   ### What changes were proposed in this PR?
   
   When the `zero-shot-image-classification` task ran without at least 2 
candidate labels, the operator raised the error from *inside* the per-row loop, 
so it crashed mid-run instead of failing cleanly. This moves the check up 
front, alongside the operator's other config validations, so it fails fast with 
a clear message before any rows are processed.
   
   Labels now come from the **Candidate Labels** field only (matching the text 
`zero-shot-classification` task); the old fallback that read labels from the 
prompt column is removed.
   
   ### Any related issues?
   
   Closes #7199 (the Part B follow-up to #7297, which addressed the same issue).
   
   ### How was this PR tested?
   
   Unit tests + the generated-Python compile check, plus a quick headless run 
of the generated operator: with 0 labels it now raises a clear "requires at 
least 2 Candidate Labels" error before the loop; with 2+ labels it proceeds 
normally.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Yes, this PR was co-authored with Claude in compliance with ASF policy.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to