Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/21719#discussion_r200498918
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/util/Instrumentation.scala ---
@@ -148,12 +170,25 @@ private[spark] class Instrumentation[E <:
Estimator[_]] private (
}
+ // TODO: Remove this (possibly replace with logModel?)
/**
* Logs the successful completion of the training session.
*/
def logSuccess(model: Model[_]): Unit = {
log(s"training finished")
}
+
+ def logSuccess(): Unit = {
+ log("training finished")
+ }
+
+ /**
+ * Logs an exception raised during a training session.
+ */
+ def logFailure(e: Throwable): Unit = {
+ val msg = e.getStackTrace.mkString("\n")
+ super.logInfo(msg)
--- End diff --
Failures should go to ERROR level.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]