Skip to content

Commit f53e8d7

Browse files
committed
fix bug: if test and sparse_remote_update can not co-exsit, crash trainer if necessary
1 parent b6d036a commit f53e8d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

paddle/trainer/Trainer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ void Trainer::init(const std::shared_ptr<TrainerConfigHelper>& config,
226226
DataProvider::create(config_->getTestDataConfig(), *config_, gpuData));
227227
}
228228
if (testDataProvider_) {
229+
if (config_->getOptConfig().use_sparse_remote_updater()) {
230+
LOG(FATAL) << "It's prohibited to set sparse_remote_update "
231+
<< "in some layers if testing will be under going "
232+
<< "in the middle of training. You can do testing "
233+
<< "within separate process.";
234+
}
229235
createTester();
230236
}
231237

0 commit comments

Comments
 (0)