提交 ba68704e 编写于 作者: Y Yu Yang

Fix api test, fix testing script for macos

上级 b102d294
...@@ -20,11 +20,7 @@ popd > /dev/null ...@@ -20,11 +20,7 @@ popd > /dev/null
cd $SCRIPTPATH cd $SCRIPTPATH
if [ ! -f ../../dist/*.whl ] ; then # Swig not compiled. rm -rf .test_env
exit 0
fi
rm .test_env -rf
virtualenv .test_env virtualenv .test_env
source .test_env/bin/activate source .test_env/bin/activate
......
...@@ -66,7 +66,9 @@ Tester::Tester(const std::shared_ptr<TrainerConfigHelper>& config, ...@@ -66,7 +66,9 @@ Tester::Tester(const std::shared_ptr<TrainerConfigHelper>& config,
} }
void Tester::startTestPeriod() { void Tester::startTestPeriod() {
testDataProvider_->reset(); if (testDataProvider_) {
testDataProvider_->reset();
}
testEvaluator_->start(); testEvaluator_->start();
testContext_.cost = 0; testContext_.cost = 0;
testContext_.numSamples = 0; testContext_.numSamples = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册