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 2015/06/28 04:16:26 UTC

[1/7] incubator-singa git commit: SINGA-27 Generate python modules for proto objects

Repository: incubator-singa
Updated Branches:
  refs/heads/master 7d9c0fb4b -> cce3aebef


SINGA-27 Generate python modules for proto objects


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

Branch: refs/heads/master
Commit: 132eaa3e14c1078b067c04c0c3b634c5a30fc92e
Parents: 9dc0567
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Sat Jun 27 23:45:10 2015 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Sat Jun 27 23:45:10 2015 +0800

----------------------------------------------------------------------
 Makefile.am             |   4 ++++
 Makefile.in             |   4 ++++
 README.md               |  15 ++++++++++++++-
 tool/plot/model_pb2.pyc | Bin 0 -> 40658 bytes
 4 files changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/132eaa3e/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index 1125c01..f0fcfe4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,6 +14,7 @@ PROTOS := $(top_srcdir)/src/proto/cluster.proto $(top_srcdir)/src/proto/model.pr
 PROTO_SRCS := src/proto/cluster.pb.cc src/proto/model.pb.cc src/proto/common.pb.cc
 PROTO_HDRS := src/proto/cluster.pb.h  src/proto/model.pb.h src/proto/common.pb.h
 PROTO_OBJS := src/proto/cluster.pb.o src/proto/model.pb.o src/proto/common.pb.o
+PROTO_PYS := tool/plot/cluster_pb2.py tool/plot/model_pb2.py tool/plot/common_pb2.py
 
 SINGA_SRCS := src/utils/cluster.cc \
 			  src/utils/cluster_rt.cc \
@@ -118,10 +119,13 @@ singa_LDFLAGS =	-I./include \
 
 clean-local:
 	rm -rf $(PROTO_SRCS) $(PROTO_HDRS)
+	rm -rf $(PROTO_PYS)
 
 
 $(PROTO_HDRS) $(PROTO_SRCS): $(PROTOS)
+	echo $(top_srcdir)
 	protoc --proto_path=$(top_srcdir)/src/proto --cpp_out=$(top_srcdir)/src/proto $(PROTOS)
+	protoc --proto_path=$(top_srcdir)/src/proto --python_out=$(top_srcdir)/tool/plot $(PROTOS)
 	mkdir -p $(top_srcdir)/include/proto/
 	cp $(top_srcdir)/src/proto/*.pb.h $(top_srcdir)/include/proto/
 	@echo

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/132eaa3e/Makefile.in
----------------------------------------------------------------------
diff --git a/Makefile.in b/Makefile.in
index cbb46b0..4f59a0d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -326,6 +326,7 @@ PROTOS := $(top_srcdir)/src/proto/cluster.proto $(top_srcdir)/src/proto/model.pr
 PROTO_SRCS := src/proto/cluster.pb.cc src/proto/model.pb.cc src/proto/common.pb.cc
 PROTO_HDRS := src/proto/cluster.pb.h  src/proto/model.pb.h src/proto/common.pb.h
 PROTO_OBJS := src/proto/cluster.pb.o src/proto/model.pb.o src/proto/common.pb.o
+PROTO_PYS := tool/plot/cluster_pb2.py tool/plot/model_pb2.py tool/plot/common_pb2.py
 SINGA_SRCS := src/utils/cluster.cc \
 			  src/utils/cluster_rt.cc \
 			  src/utils/graph.cc \
@@ -1292,9 +1293,12 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES
 
 clean-local:
 	rm -rf $(PROTO_SRCS) $(PROTO_HDRS)
+	rm -rf $(PROTO_PYS)
 
 $(PROTO_HDRS) $(PROTO_SRCS): $(PROTOS)
+	echo $(top_srcdir)
 	protoc --proto_path=$(top_srcdir)/src/proto --cpp_out=$(top_srcdir)/src/proto $(PROTOS)
+	protoc --proto_path=$(top_srcdir)/src/proto --python_out=$(top_srcdir)/tool/plot $(PROTOS)
 	mkdir -p $(top_srcdir)/include/proto/
 	cp $(top_srcdir)/src/proto/*.pb.h $(top_srcdir)/include/proto/
 	@echo

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/132eaa3e/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index b8eab1f..3a4e1f9 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ For libraries like openblas, opencv, older versions may also work, because we do
 
 ###Building SINGA From Sources
 
-The build system of SINGA is based on GNU autotools. To build singa, you need gcc version >= 4.8.2.
+The build system of SINGA is based on GNU autotools. To build singa, you need gcc version >= 4.8.2. To support visualization, you need python2.7.x.
 The common steps to build SINGA can be:
 
 	1.Extract source files;
@@ -125,3 +125,16 @@ A3:Since OpenBLAS library is installed in /opt folder by default or /other/folde
 Or as an alternative option, you can also edit LIBRARY_PATH to figure it out.
 
 #
+
+Q4:I get ImportError from google.protobuf.internal when I try to import .py files. (ImportError: cannot import name enum_type_wrapper)
+
+A4:After install google protobuf by "make install", we should install python runtime libraries. Go to protobuf source directory, run:
+
+	$ cd /PROTOBUF/SOURCE/FOLDER
+	$ cd python
+	$ python setup.py build
+	$ python setup.py install
+
+You may need "sudo" when you try to install python runtime libraries in system folder.
+
+#

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/132eaa3e/tool/plot/model_pb2.pyc
----------------------------------------------------------------------
diff --git a/tool/plot/model_pb2.pyc b/tool/plot/model_pb2.pyc
new file mode 100644
index 0000000..fe59913
Binary files /dev/null and b/tool/plot/model_pb2.pyc differ


[2/7] incubator-singa git commit: SINGA-27 Generate python modules for proto objects

Posted by wa...@apache.org.
SINGA-27 Generate python modules for proto objects


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

Branch: refs/heads/master
Commit: 27b863cda4c8d38c8e92739b50031f4b3e0d1b25
Parents: 132eaa3
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Sat Jun 27 23:46:49 2015 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Sat Jun 27 23:46:49 2015 +0800

----------------------------------------------------------------------
 thirdparty/install.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/27b863cd/thirdparty/install.sh
----------------------------------------------------------------------
diff --git a/thirdparty/install.sh b/thirdparty/install.sh
index 52a74bc..04321d2 100755
--- a/thirdparty/install.sh
+++ b/thirdparty/install.sh
@@ -273,11 +273,19 @@ function install_protobuf()
 			echo "install protobuf in $1";
 			./configure --prefix=$1;
 			make && make install;
+			cd python;
+			python setup.py build;
+			python setup.py install --prefix=$1;
+			cd ..;
 		elif [ $# == 0 ]
 		then
 			echo "install protobuf in default path";
 			./configure;
 			make && sudo make install;
+			cd python;
+			python setup.py build;
+			sudo python setup.py install;
+			cd ..;
 		else
 			echo "wrong commands";
 	fi


[4/7] incubator-singa git commit: SINGA-27 Generate python modules for proto objects

Posted by wa...@apache.org.
SINGA-27 Generate python modules for proto objects


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

Branch: refs/heads/master
Commit: 327ab9b0f50654feaa43c1124685529bd798496a
Parents: 3c5b569
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Sun Jun 28 00:01:34 2015 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Sun Jun 28 00:01:34 2015 +0800

----------------------------------------------------------------------
 Makefile.am          | 2 +-
 Makefile.in          | 2 +-
 tool/plot/.gitignore | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/327ab9b0/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index f0fcfe4..21de15f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -123,8 +123,8 @@ clean-local:
 
 
 $(PROTO_HDRS) $(PROTO_SRCS): $(PROTOS)
-	echo $(top_srcdir)
 	protoc --proto_path=$(top_srcdir)/src/proto --cpp_out=$(top_srcdir)/src/proto $(PROTOS)
+	mkdir -p $(top_srcdir)/tool/plot/
 	protoc --proto_path=$(top_srcdir)/src/proto --python_out=$(top_srcdir)/tool/plot $(PROTOS)
 	mkdir -p $(top_srcdir)/include/proto/
 	cp $(top_srcdir)/src/proto/*.pb.h $(top_srcdir)/include/proto/

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/327ab9b0/Makefile.in
----------------------------------------------------------------------
diff --git a/Makefile.in b/Makefile.in
index 4f59a0d..561103d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1296,8 +1296,8 @@ clean-local:
 	rm -rf $(PROTO_PYS)
 
 $(PROTO_HDRS) $(PROTO_SRCS): $(PROTOS)
-	echo $(top_srcdir)
 	protoc --proto_path=$(top_srcdir)/src/proto --cpp_out=$(top_srcdir)/src/proto $(PROTOS)
+	mkdir -p $(top_srcdir)/tool/plot/
 	protoc --proto_path=$(top_srcdir)/src/proto --python_out=$(top_srcdir)/tool/plot $(PROTOS)
 	mkdir -p $(top_srcdir)/include/proto/
 	cp $(top_srcdir)/src/proto/*.pb.h $(top_srcdir)/include/proto/

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/327ab9b0/tool/plot/.gitignore
----------------------------------------------------------------------
diff --git a/tool/plot/.gitignore b/tool/plot/.gitignore
new file mode 100644
index 0000000..e69de29


[6/7] incubator-singa git commit: SINGA-27 Generate python modules for proto objects

Posted by wa...@apache.org.
SINGA-27 Generate python modules for proto objects


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

Branch: refs/heads/master
Commit: 9d2d859fd2c8e2f2e121c47a33fc0152bed8e66b
Parents: b87c21d
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Sun Jun 28 00:10:47 2015 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Sun Jun 28 00:10:47 2015 +0800

----------------------------------------------------------------------
 tool/plot/plot.py | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/9d2d859f/tool/plot/plot.py
----------------------------------------------------------------------
diff --git a/tool/plot/plot.py b/tool/plot/plot.py
new file mode 100644
index 0000000..e69de29


[7/7] incubator-singa git commit: Merge branch 'master' of https://github.com/apache/incubator-singa

Posted by wa...@apache.org.
Merge branch 'master' of https://github.com/apache/incubator-singa


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

Branch: refs/heads/master
Commit: cce3aebef3c26c17ee702865a17f454c4e5b2ecc
Parents: 9d2d859 7d9c0fb
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Sun Jun 28 00:16:49 2015 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Sun Jun 28 00:16:49 2015 +0800

----------------------------------------------------------------------
 bin/singa-cleanup.sh      | 43 ---------------------
 bin/singa-run.sh          | 85 ++++++++++++++++++++++++++++++++++--------
 bin/singa-stop.sh         | 71 +++++++++++++++++++++++++++++++++++
 bin/zk-service.sh         | 28 ++++++--------
 examples/cifar10/hostfile |  3 +-
 include/trainer/trainer.h |  2 +-
 include/utils/blob.h      |  1 +
 include/utils/common.h    | 16 +++++---
 src/main.cc               | 12 ++++--
 src/proto/cluster.proto   |  2 +-
 src/trainer/server.cc     |  9 +++--
 src/trainer/trainer.cc    | 42 +++++++++++----------
 src/trainer/worker.cc     | 11 ++++--
 src/utils/blob.cc         |  2 +-
 src/utils/cluster.cc      |  4 +-
 src/utils/common.cc       | 56 +++++++++++++++++++---------
 src/utils/param.cc        | 30 +++++++++------
 17 files changed, 271 insertions(+), 146 deletions(-)
----------------------------------------------------------------------



[5/7] incubator-singa git commit: SINGA-27 Generate python modules for proto objects

Posted by wa...@apache.org.
SINGA-27 Generate python modules for proto objects


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

Branch: refs/heads/master
Commit: b87c21d3398c8706e368e47400299308609de55d
Parents: 327ab9b
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Sun Jun 28 00:02:54 2015 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Sun Jun 28 00:02:54 2015 +0800

----------------------------------------------------------------------
 tool/plot/.gitignore | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/b87c21d3/tool/plot/.gitignore
----------------------------------------------------------------------
diff --git a/tool/plot/.gitignore b/tool/plot/.gitignore
deleted file mode 100644
index e69de29..0000000


[3/7] incubator-singa git commit: SINGA-27 Generate python modules for proto objects

Posted by wa...@apache.org.
SINGA-27 Generate python modules for proto objects


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

Branch: refs/heads/master
Commit: 3c5b569d2d28d597506fb65a509a383055d14f73
Parents: 27b863c
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Sat Jun 27 23:52:18 2015 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Sat Jun 27 23:52:18 2015 +0800

----------------------------------------------------------------------
 tool/plot/model_pb2.pyc | Bin 40658 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/3c5b569d/tool/plot/model_pb2.pyc
----------------------------------------------------------------------
diff --git a/tool/plot/model_pb2.pyc b/tool/plot/model_pb2.pyc
deleted file mode 100644
index fe59913..0000000
Binary files a/tool/plot/model_pb2.pyc and /dev/null differ