This is an automated email from the ASF dual-hosted git repository.
xuang7 pushed a commit to branch release/v1.2
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/release/v1.2 by this push:
new 8c02dce18f fix(MachineLearningScorer, v1.2): splice metric_list
verbatim instead of double-encoding (#7003)
8c02dce18f is described below
commit 8c02dce18fb0df64a3c05c3593f655cd1964e474
Author: Yicong Huang <[email protected]>
AuthorDate: Wed Jul 29 14:10:01 2026 -0400
fix(MachineLearningScorer, v1.2): splice metric_list verbatim instead of
double-encoding (#7003)
### What changes were proposed in this PR?
Backport of #6805 to `release/v1.2`, cherry-picked from
3a51bfb8761e96d10460f097b0e1803e27c2c5d0.
**Source fix only.** The test changes from #6805 were omitted: the
touched test spec(s) do not exist on `release/v1.2` (or depend on
main-only test infrastructure), so backporting them cleanly is not
possible. Only the source fix is carried over, per maintainer guidance.
### Any related issues, documentation, discussions?
Backport of #6805. Originally linked #6790.
### How was this PR tested?
Release-branch CI runs on this PR. The source change cherry-picked
cleanly; test changes were intentionally dropped (see above).
### Was this PR authored or co-authored using generative AI tooling?
Yes — backport prepared with Claude Code (mechanical cherry-pick +
conflict resolution; the change itself is #6805 by its original author).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Kary Zheng <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
---
.../machineLearning/Scorer/MachineLearningScorerOpDesc.scala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/machineLearning/Scorer/MachineLearningScorerOpDesc.scala
b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/machineLearning/Scorer/MachineLearningScorerOpDesc.scala
index a2f72a513e..e43c3f3947 100644
---
a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/machineLearning/Scorer/MachineLearningScorerOpDesc.scala
+++
b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/machineLearning/Scorer/MachineLearningScorerOpDesc.scala
@@ -122,8 +122,10 @@ class MachineLearningScorerOpDesc extends
PythonOperatorDescriptor {
case _ => throw new
IllegalArgumentException("Unknown metric type")
}
- private def getSelectedMetrics(): EncodableString = {
- // Return a string of metrics using the getEachScorerName() method
+ // Must be a plain String, not EncodableString: this is a raw Python fragment
+ // spliced verbatim into `metric_list = [...]`. An EncodableString would be
+ // re-encoded as one quoted value, collapsing the list into a single element.
+ private def getSelectedMetrics(): String = {
val metric = if (isRegression) regressionMetrics else classificationMetrics
metric.map(metric => getMetricName(metric)).mkString("'", "','", "'")
}