Skip to content

Commit

Permalink
add logError and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
WeichenXu123 committed Apr 5, 2018
1 parent 8a3ce3e commit f05bcdf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Expand Up @@ -519,7 +519,7 @@ class LogisticRegression @Since("1.2.0") (
}
instr.logNamedValue(Instrumentation.loggerTags.numExamples, summarizer.count)
instr.logNamedValue("lowestLabelWeight", labelSummarizer.histogram.min.toString)
instr.logNamedValue("highestLabelWeight", labelSummarizer.histogram.min.toString)
instr.logNamedValue("highestLabelWeight", labelSummarizer.histogram.max.toString)

val histogram = labelSummarizer.histogram
val numInvalid = labelSummarizer.countInvalid
Expand Down Expand Up @@ -563,7 +563,7 @@ class LogisticRegression @Since("1.2.0") (
if (numInvalid != 0) {
val msg = s"Classification labels should be in [0 to ${numClasses - 1}]. " +
s"Found $numInvalid invalid labels."
logError(msg)
instr.logError(msg)
throw new SparkException(msg)
}

Expand Down
Expand Up @@ -62,6 +62,13 @@ private[spark] class Instrumentation[E <: Estimator[_]] private (
super.logWarning(prefix + msg)
}

/**
* Logs a error message with a prefix that uniquely identifies the training session.
*/
override def logError(msg: => String): Unit = {
super.logError(prefix + msg)
}

/**
* Logs an info message with a prefix that uniquely identifies the training session.
*/
Expand Down

0 comments on commit f05bcdf

Please sign in to comment.