Change training stage from ResultStage to ShuffleMapStage (#9423)

This commit is contained in:
jinmfeng001 2023-08-03 23:40:04 +08:00 committed by GitHub
parent 1332ff787f
commit 04c99683c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -407,7 +407,10 @@ object XGBoost extends Serializable {
}} }}
val (booster, metrics) = boostersAndMetrics.collect()(0) // The repartition step is to make training stage as ShuffleMapStage, so that when one
// of the training task fails the training stage can retry. ResultStage won't retry when
// it fails.
val (booster, metrics) = boostersAndMetrics.repartition(1).collect()(0)
val trackerReturnVal = tracker.waitFor(0L) val trackerReturnVal = tracker.waitFor(0L)
logger.info(s"Rabit returns with exit code $trackerReturnVal") logger.info(s"Rabit returns with exit code $trackerReturnVal")
if (trackerReturnVal != 0) { if (trackerReturnVal != 0) {