WeichenXu123 commented on a change in pull request #32399:
URL: https://github.com/apache/spark/pull/32399#discussion_r629789015
##########
File path: mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala
##########
@@ -183,11 +190,28 @@ class CrossValidator @Since("1.2.0") (@Since("1.4.0")
override val uid: String)
}
// Wait for metrics to be calculated
- val foldMetrics = foldMetricFutures.map(ThreadUtils.awaitResult(_,
Duration.Inf))
-
- // Unpersist training & validation set once all metrics have been
produced
- trainingDataset.unpersist()
- validationDataset.unpersist()
+ val foldMetrics = try {
+ foldMetricFutures.map(ThreadUtils.awaitResult(_, Duration.Inf))
+ }
+ catch {
+ case e: Throwable =>
+ subTaskFailed = true
+ try {
+ Thread.sleep(1000)
Review comment:
https://github.com/apache/spark/pull/32399#discussion_r629087709
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]