You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2016/01/01 13:29:12 UTC

[03/10] incubator-singa git commit: SINGA-81 Add Python Helper, which enables users to construct a model (JobProto) and run Singa in Python

SINGA-81 Add Python Helper, which enables users to construct a model (JobProto) and run Singa in Python

Add implementation of Test(string str) in driver.cc


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/94435ebd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/94435ebd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/94435ebd

Branch: refs/heads/master
Commit: 94435ebde81ccf7deb19b42eebf5bfa5fbc4e7cb
Parents: ceb0665
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Mon Dec 28 16:56:28 2015 +0800
Committer: chonho <le...@comp.nus.edu.sg>
Committed: Fri Jan 1 15:59:14 2016 +0800

----------------------------------------------------------------------
 src/driver.cc | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/94435ebd/src/driver.cc
----------------------------------------------------------------------
diff --git a/src/driver.cc b/src/driver.cc
index 1bb9335..67b5c28 100644
--- a/src/driver.cc
+++ b/src/driver.cc
@@ -179,6 +179,12 @@ void Driver::Train(bool resume, const JobProto& job_conf) {
   Train(job);
 }
 
+void Driver::Test(const std::string str) {
+  JobProto job_conf;
+  job_conf.ParseFromString(str);
+  Test(job_conf);
+}
+
 void Driver::Test(const JobProto& job_conf) {
   Cluster::Setup(job_id_, singa_conf_, job_conf.cluster());
   Cluster::Get()->Register(getpid(), "localhost");