panbingkun commented on code in PR #45837:
URL: https://github.com/apache/spark/pull/45837#discussion_r1550687850


##########
mllib/src/test/scala/org/apache/spark/mllib/tree/GradientBoostedTreesSuite.scala:
##########
@@ -51,8 +53,9 @@ class GradientBoostedTreesSuite extends SparkFunSuite with 
MLlibTestSparkContext
             gbt, GradientBoostedTreesSuite.data.toImmutableArraySeq, 0.06)
         } catch {
           case e: java.lang.AssertionError =>
-            logError(s"FAILED for numIterations=$numIterations, 
learningRate=$learningRate," +
-              s" subsamplingRate=$subsamplingRate")
+            logError(log"FAILED for numIterations=${MDC(NUM_ITERATIONS, 
numIterations)}, " +

Review Comment:
   Done



##########
mllib/src/main/scala/org/apache/spark/ml/classification/LinearSVC.scala:
##########
@@ -220,10 +221,11 @@ class LinearSVC @Since("2.2.0") (
     instr.logNumFeatures(numFeatures)
 
     if (numInvalid != 0) {
-      val msg = s"Classification labels should be in [0 to ${numClasses - 1}]. 
" +
-        s"Found $numInvalid invalid labels."
+      val msg = log"Classification labels should be in " +
+        log"${MDC(RANGE_CLASSIFICATION_LABELS, s"[0 to ${numClasses - 1}]")}. 
" +
+        log"Found ${MDC(NUM_CLASSIFICATION_LABELS, numInvalid)} invalid 
labels."

Review Comment:
   Yeah



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to