enable train multiple models by distinguishing stage IDs (#1493)
This commit is contained in:
parent
bdfa8c0e09
commit
582ee63e34
@ -65,7 +65,8 @@ object XGBoost extends Serializable {
|
||||
if (trainingSamples.hasNext) {
|
||||
val cacheFileName: String = {
|
||||
if (useExternalMemory && trainingSamples.hasNext) {
|
||||
s"$appName-dtrain_cache-${TaskContext.getPartitionId()}"
|
||||
s"$appName-${TaskContext.get().stageId()}-" +
|
||||
s"dtrain_cache-${TaskContext.getPartitionId()}"
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ class XGBoostModel(_booster: Booster) extends Serializable {
|
||||
Rabit.init(rabitEnv.asJava)
|
||||
val cacheFileName = {
|
||||
if (useExternalCache) {
|
||||
s"$appName-dtest_cache-${TaskContext.getPartitionId()}"
|
||||
s"$appName-${TaskContext.get().stageId()}-dtest_cache-${TaskContext.getPartitionId()}"
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user