[jvm-packages] Deterministically XGBoost training on exception (#2405)
Previously the code relied on the tracker process being terminated by the OS, which was not the case on Windows. Closes #2394
This commit is contained in:
@@ -127,6 +127,12 @@ private[scala] class RabitTracker(numWorkers: Int, port: Option[Int] = None,
|
||||
}
|
||||
}
|
||||
|
||||
def stop(): Unit = {
|
||||
if (!system.isTerminated) {
|
||||
system.shutdown()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Map of necessary environment variables to initiate Rabit workers.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user