Skip to content

Commit

Permalink
Updated go protos
Browse files Browse the repository at this point in the history
  • Loading branch information
hemantkashniyal authored and seldondev committed Dec 20, 2019
1 parent cbbcc5a commit 8644971
Show file tree
Hide file tree
Showing 37 changed files with 11,626 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,5 @@ testing/scripts/go
.tox

operator/operator.tar
go/vendor
go/tensorflow
12 changes: 12 additions & 0 deletions go/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.PHONY: compile_tensorflow_proto
compile_tensorflow_proto:
./generate_tensorflow_proto.sh

.PHONY: compile_proto
compile_proto: compile_tensorflow_proto
mkdir -p pkg/api
cp -r vendor/github.com/tensorflow pkg/api/
cp ../proto/prediction.proto pkg/api
cd pkg/api && protoc -I. -I${CURDIR}/tensorflow --go_out=paths=source_relative,plugins=grpc:. prediction.proto
rm pkg/api/prediction.proto
find ./pkg -name "*.pb.go" -type f -exec perl -e "s/github\.com\/tensorflow/github\.com\/seldonio\/seldon-core\/go\/pkg\/api\/tensorflow/g" -pi {} +
11 changes: 11 additions & 0 deletions go/generate_tensorflow_proto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# set -exv
rm -rf vendor
mkdir -p vendor
git clone https://github.com/tensorflow/tensorflow.git || git --git-dir ./tensorflow/.git pull
PROTOC_OPTS='-I tensorflow --go_out=plugins=grpc:vendor'
eval "protoc $PROTOC_OPTS tensorflow/tensorflow/core/framework/*.proto"
eval "protoc $PROTOC_OPTS tensorflow/tensorflow/core/example/*.proto"
eval "protoc $PROTOC_OPTS tensorflow/tensorflow/core/lib/core/*.proto"
eval "protoc $PROTOC_OPTS tensorflow/tensorflow/core/protobuf/{saver,meta_graph}.proto"

mv vendor/tensorflow/core/* vendor/github.com/tensorflow/tensorflow/tensorflow/go/core
Loading

0 comments on commit 8644971

Please sign in to comment.