PG1204 opened a new issue, #7199:
URL: https://github.com/apache/texera/issues/7199

   ### What happened?
   
   Config validation is inconsistent: most checks use Python `assert` (stripped 
under `python -O`, and raising `AssertionError`), while 
`zero-shot-image-classification` raises `ValueError` inside the per-row loop 
(`ImageTaskCodegen`), which crashes the whole operator, whereas most per-row 
problems become error strings in the result cell.
   
   Fix direction: use explicit `raise ValueError` for config validation (not 
`assert`), and make per-row failures consistently produce an error string in 
the cell rather than crashing.
   
   Files: `.../huggingFace/codegen/HuggingFaceCodegenBase.scala` (asserts in 
`process_table`), `.../huggingFace/codegen/ImageTaskCodegen.scala` 
(zero-shot-image-classification).
   
   
   ### How to reproduce?
   
   Run zero-shot-image-classification with fewer than 2 candidate labels -> the 
operator crashes, rather than writing a per-row error like other 
misconfigurations do.
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   _No response_
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   
   ```


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