From ba68704edb5b866fafa50e091f9c7b6f3f3a740a Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Mon, 5 Dec 2016 22:56:43 +0800 Subject: [PATCH] Fix api test, fix testing script for macos --- paddle/api/test/run_tests.sh | 6 +----- paddle/trainer/Tester.cpp | 4 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/paddle/api/test/run_tests.sh b/paddle/api/test/run_tests.sh index a4814f98f89..ff69c452649 100755 --- a/paddle/api/test/run_tests.sh +++ b/paddle/api/test/run_tests.sh @@ -20,11 +20,7 @@ popd > /dev/null cd $SCRIPTPATH -if [ ! -f ../../dist/*.whl ] ; then # Swig not compiled. - exit 0 -fi - -rm .test_env -rf +rm -rf .test_env virtualenv .test_env source .test_env/bin/activate diff --git a/paddle/trainer/Tester.cpp b/paddle/trainer/Tester.cpp index d941a574c0f..6a5b7241a02 100644 --- a/paddle/trainer/Tester.cpp +++ b/paddle/trainer/Tester.cpp @@ -66,7 +66,9 @@ Tester::Tester(const std::shared_ptr& config, } void Tester::startTestPeriod() { - testDataProvider_->reset(); + if (testDataProvider_) { + testDataProvider_->reset(); + } testEvaluator_->start(); testContext_.cost = 0; testContext_.numSamples = 0; -- GitLab