You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by gi...@apache.org on 2026/10/07 09:00:06 UTC
(texera) 01/01: refactor(workflow-operator): remove commented-out scorer-name helpers (#8900)
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-8900-2cd44ee0d8219a7cc0f16e8c4ee869c0bad9feec
in repository https://gitbox.apache.org/repos/asf/texera.git
commit 404df27238ce46d8b9216fba1adcfa1b0a99a369
Author: Matthew B. <mg...@uci.edu>
AuthorDate: Wed Oct 7 08:59:41 2026 +0000
refactor(workflow-operator): remove commented-out scorer-name helpers (#8900)
### What changes were proposed in this PR?
- Remove two fully commented-out private defs
(`getClassificationScorerName`, `getRegressionScorerName`) from
`MachineLearningScorerOpDesc.scala`.
- Their logic is already provided by the live `getMetricName`, which
does the same `getName()` dispatch across both metric types, so the
commented block was dead scaffolding.
### Any related issues, documentation, discussions?
Closes: #8899
### How was this PR tested?
- Non-functional change (removal of commented-out code only); no
behavior changes, so no test added.
- Confirm the names are referenced nowhere: run `rg -nw
"getClassificationScorerName|getRegressionScorerName"` and expect no
hits.
### Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF
---
.../machineLearning/Scorer/MachineLearningScorerOpDesc.scala | 9 ---------
1 file changed, 9 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 4c78f3493a..e7ba0a7259 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
@@ -212,15 +212,6 @@ class MachineLearningScorerOpDesc extends PythonOperatorDescriptor with Standalo
Map(operatorInfo.outputPorts.head.id -> outputSchema)
}
-// private def getClassificationScorerName(scorer: classificationMetricsFnc): String = {
-// // Directly return the name of the scorer using the getName() method
-// scorer.getName()
-// }
-// private def getRegressionScorerName(scorer: regressionMetricsFnc): String = {
-// // Directly return the name of the scorer using the getName() method
-// scorer.getName()
-// }
-
private def getMetricName(metric: Any): EncodableString =
metric match {
case m: regressionMetricsFnc => m.getName()