Yicong-Huang opened a new issue, #8756:
URL: https://github.com/apache/texera/issues/8756

   ## What is wrong
   
   The Machine Learning Scorer's schema-time validation accepts a 
classification column pair whose types are identical but not numeric (two 
TIMESTAMP columns, two BINARY columns, two LARGE_BINARY columns). The operator 
then fails at runtime with an opaque error raised from inside scikit-learn, 
pointing at neither column.
   
   ## How to reproduce
   
   1. Add a Machine Learning Scorer operator.
   2. Set the task to classification (Regression off).
   3. Pick two TIMESTAMP columns (or two BINARY columns) as the Actual Value 
and Predicted Value.
   4. Select Precision Score, Recall Score, or F1 Score.
   5. Run. Schema validation passes, then the run fails with an error from 
inside scikit-learn (e.g. `ValueError` on the label type) instead of a message 
naming the two columns.
   
   ## Why it matters
   
   The schema-time check exists precisely to reject unscorable column pairs 
before execution with a message that names the columns. A number-versus-string 
mix is rejected correctly, but the "comparable" predicate also accepts 
identical non-numeric types, so the exact failure mode the check was built to 
prevent still reaches the user at runtime.
   
   ## Evidence
   
   
`common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/machineLearning/Scorer/MachineLearningScorerOpDesc.scala`,
 `validateScoredColumns`:
   
   ```scala
   val comparable = (numeric.contains(actualType) && 
numeric.contains(predictType)) ||
     actualType == predictType
   ```
   
   The `actualType == predictType` arm is over-inclusive: it holds for 
TIMESTAMP, BINARY, and LARGE_BINARY, none of which scikit-learn's 
classification metrics accept. Restricting the equality arm to the types the 
metrics can actually score (string, boolean) closes the hole.
   
   Verified still present on `main` (checked 2026-09-28).
   


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