Skip to content

Commit

Permalink
Merge pull request #891 from backyes/sparse_bug
Browse files Browse the repository at this point in the history
[Sparse Bug]  Test and sparse_remote_update can not co-exsit, crash trainer if necessary
  • Loading branch information
reyoung authored Dec 16, 2016
2 parents bd3f976 + 7c74304 commit 04fb1fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions paddle/trainer/Tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ Tester::Tester(const std::shared_ptr<TrainerConfigHelper>& config,
gradientMachine_(gradientMachine),
parameterUpdater_(parameterUpdater),
testDataProvider_(testDataProvider) {
if (config_->getOptConfig().use_sparse_remote_updater()) {
LOG(FATAL) << "It's prohibited to set sparse_remote_update "
<< "when doing train and test jobs in the same "
<< "process. You could run paddle --job=test in "
<< "a separate process.";
}
testEvaluator_.reset(gradientMachine_->makeEvaluator());
if (intconfig_->distributeTest) {
testParameterClient_.reset(new ParameterClient2(true));
Expand Down

0 comments on commit 04fb1fc

Please sign in to comment.