Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntaxnet - TensorFlow 0.9 #183

Closed
borisstock opened this issue Jun 6, 2016 · 7 comments
Closed

Syntaxnet - TensorFlow 0.9 #183

borisstock opened this issue Jun 6, 2016 · 7 comments
Assignees

Comments

@borisstock
Copy link

Innocent as I am, I've tried to update the TensorFlow submodule used by the Syntaxnet model to the release 0.9 to make usage of the new option to compile it with GPU support on Mac OS X.

Now I'm running into some protobuf problems I can not explain:

In file included from syntaxnet/unpack_sparse_features.cc:26:
In file included from external/tf/tensorflow/core/framework/op_kernel.h:26:
In file included from external/tf/tensorflow/core/framework/function.h:24:
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:127:3: error: unknown type name 'PROTOBUF_DEPRECATED_ATTR'
  PROTOBUF_DEPRECATED_ATTR void clear_version();
  ^
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:127:28: error: expected member name or ';' after declaration specifiers
  PROTOBUF_DEPRECATED_ATTR void clear_version();
  ~~~~~~~~~~~~~~~~~~~~~~~~ ^
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:128:3: error: unknown type name 'PROTOBUF_DEPRECATED_ATTR'
  PROTOBUF_DEPRECATED_ATTR static const int kVersionFieldNumber = 3;
  ^
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:128:28: error: expected member name or ';' after declaration specifiers
  PROTOBUF_DEPRECATED_ATTR static const int kVersionFieldNumber = 3;
  ~~~~~~~~~~~~~~~~~~~~~~~~ ^
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:129:3: error: use of undeclared identifier 'PROTOBUF_DEPRECATED_ATTR'
  PROTOBUF_DEPRECATED_ATTR ::google::protobuf::int32 version() const;
  ^
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:130:3: error: unknown type name 'PROTOBUF_DEPRECATED_ATTR'
  PROTOBUF_DEPRECATED_ATTR void set_version(::google::protobuf::int32 value);
  ^
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:130:28: error: expected member name or ';' after declaration specifiers
  PROTOBUF_DEPRECATED_ATTR void set_version(::google::protobuf::int32 value);
  ~~~~~~~~~~~~~~~~~~~~~~~~ ^
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:380:23: error: out-of-line definition of 'clear_version' does not match any declaration in 'tensorflow::GraphDef'
inline void GraphDef::clear_version() {
                      ^~~~~~~~~~~~~
bazel-out/local-opt/genfiles/external/tf/tensorflow/core/framework/graph.pb.h:387:23: error: out-of-line definition of 'set_version' does not match any declaration in 'tensorflow::GraphDef'
inline void GraphDef::set_version(::google::protobuf::int32 value) {
                      ^~~~~~~~~~~

If I build the tensorflow submodule by itself, it compiles without any problems, but not when built with the syntaxnet bazel build commands.

Can someone point me in the direction what would be necessary to get SyntaxNet working with TensorFlow 0.9? I would be happy to invest some time into that...

@girving
Copy link

girving commented Jun 7, 2016

@calberti: Can you take a look?

@calberti
Copy link
Contributor

Updating the tensorflow submodule definitely requires some changes in syntaxnet. We'll update the tf submodule with future release -- or feel free to send us a pull request if you get syntaxnet to work at with a more recent tf.

@calberti
Copy link
Contributor

In terms of direction for fixing this, this is a problem with protocol buffers generated code. There are probably changes needed in https://github.com/tensorflow/models/blob/master/syntaxnet/WORKSPACE and https://github.com/tensorflow/models/blob/master/syntaxnet/syntaxnet/BUILD.

@borisstock
Copy link
Author

Thank you very much for the directions! I will definitely invest time into this.

@calberti
Copy link
Contributor

Actually, have you seen this pull request?
#204
It might be relevant.

@borisstock
Copy link
Author

👍 thanks a lot. of course!

@dmansfield
Copy link
Contributor

BTW I've been using syntaxnet with TF master with the referenced PR and it passes tests and also works fine with some other changes we're working on. The main issue TBD (which is mentioned in the PR) is that due to a bug in bazel, the "if_cuda" macro doesn't work properly when used inside syntaxnet. (I don't have a fantastic workaround for that other than to patch the code in third_party/gpus/cuda/build_defs.bzl in a way that makes it work in syntaxnet, but break if TF is built directly (which I don't do currently)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants