Skip to content

Commit 04fb1fc

Browse files
authored
Merge pull request #891 from backyes/sparse_bug
[Sparse Bug] Test and sparse_remote_update can not co-exsit, crash trainer if necessary
2 parents bd3f976 + 7c74304 commit 04fb1fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

paddle/trainer/Tester.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ Tester::Tester(const std::shared_ptr<TrainerConfigHelper>& config,
4646
gradientMachine_(gradientMachine),
4747
parameterUpdater_(parameterUpdater),
4848
testDataProvider_(testDataProvider) {
49+
if (config_->getOptConfig().use_sparse_remote_updater()) {
50+
LOG(FATAL) << "It's prohibited to set sparse_remote_update "
51+
<< "when doing train and test jobs in the same "
52+
<< "process. You could run paddle --job=test in "
53+
<< "a separate process.";
54+
}
4955
testEvaluator_.reset(gradientMachine_->makeEvaluator());
5056
if (intconfig_->distributeTest) {
5157
testParameterClient_.reset(new ParameterClient2(true));

0 commit comments

Comments
 (0)