You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/09/08 14:07:27 UTC

[PR] [SPARK-59338][ML] Move predictionColumn to PredictionModel [spark]

zhengruifeng opened a new pull request, #58625:
URL: https://github.com/apache/spark/pull/58625

   ### What changes were proposed in this pull request?
   
   Move the `predictionColumn` hook from `ClassificationModel` to `PredictionModel`, and use it in
   `PredictionModel.transformImpl`.
   
   The existing classification-specific overrides continue to use the same hook. A focused test
   verifies that the generic `PredictionModel` transform path invokes an overridden
   `predictionColumn`.
   
   ### Why are the changes needed?
   
   Prediction-column expression customization is useful to prediction models generally, not only to
   classification models. Defining the hook in `PredictionModel` lets other model families provide a
   native expression or a UDF that snapshots only the prediction state they need.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Added a unit test and ran:
   
   ```
   JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 build/sbt \
     'mllib/testOnly org.apache.spark.ml.PredictorSuite' \
     'mllib/testOnly org.apache.spark.ml.classification.ClassifierSuite'
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-5)
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59338][ML] Move predictionColumn to PredictionModel [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #58625:
URL: https://github.com/apache/spark/pull/58625#issuecomment-5594575097

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/b25686edb87c3fb2d3536054aa7ab3b59381ada9
   - merged into branch-4.x https://github.com/apache/spark/commit/18e483a1961172eb4be6b710ee88b9bf8741fd0c
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59338][ML] Move predictionColumn to PredictionModel [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #58625: [SPARK-59338][ML] Move predictionColumn to PredictionModel
URL: https://github.com/apache/spark/pull/58625


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org