MacOS X: ERROR: Error evaluating WORKSPACE file.
I get this error when running bazel test.
macbookproloreto:syntaxnet admin$ bazel test --linkopt=-headerpad_max_install_names syntaxnet/... util/utf8/...
ERROR: /Volumes/MacHDD2/Developmemt/AI/models/syntaxnet/WORKSPACE:11:1: Traceback (most recent call last):
File "/Volumes/MacHDD2/Developmemt/AI/models/syntaxnet/WORKSPACE", line 11
check_version("0.2.0")
File "/private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/external/tf/tensorflow/tensorflow.bzl", line 22, in check_version
_parse_bazel_version(native.bazel_version)
File "/private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/external/tf/tensorflow/tensorflow.bzl", line 15, in _parse_bazel_version
int(number)
invalid literal for int(): "2b".
ERROR: Error evaluating WORKSPACE file.
ERROR: package contains errors: syntaxnet.
ERROR: no such package 'external': Package 'external' contains errors.
INFO: Elapsed time: 0,179s
ERROR: Couldn't start the build. Unable to run tests.
@vrv I have
commit 32ab5a58dd3714d0747da6993a01315dadbf0e0f
Author: calberti <[email protected]>
Date: Thu May 12 14:40:03 2016 -0400
Adding SyntaxNet to tensorflow/models (#63)
macbookproloreto:syntaxnet admin$ bazel version
Build label: 0.2.2b
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Mon Apr 25 08:11:19 2016 (1461571879)
Build timestamp: 1461571879
Build timestamp as int: 1461571879
(Sorry, wrong repository). @calberti @martinwicke we need to update the submodule commit for tensorflow, since it is using a version that doesn't include the fix to the parse_bazel_version function.
@vrv ok thanks let me if know if you need further info.
Even though it is bold in the docs, if you're like me and missed it the first time around:
Note: You must use bazel version 0.2.2, NOT 0.2.2b, due to a WORKSPACE issue
The invalid beta version is first in the list of download links. You have to scroll down to the non-beta version for this to work.
@jogleasonjr 🎱 it seems so, let's try again.
@jogleasonjr This is what happens
macbookproloreto:tensorflow admin$ bazel version
Build label: 0.2.2
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Apr 21 13:00:31 2016 (1461243631)
Build timestamp: 1461243631
Build timestamp as int: 1461243631
macbookproloreto:tensorflow admin$ bazel test --linkopt=-headerpad_max_install_names syntaxnet/... util/utf8/...
ERROR: no targets found beneath 'syntaxnet'.
INFO: Elapsed time: 0,115s
ERROR: Couldn't start the build. Unable to run tests.
macbookproloreto:tensorflow admin$
...ok I have found it out:
macbookproloreto:AI admin$ cd models/syntaxnet/tensorflow
macbookproloreto:tensorflow admin$ ./configure
Please specify the location of python. [Default is /usr/bin/python]:
Do you wish to build TensorFlow with GPU support? [y/N]
No GPU support will be enabled for TensorFlow
Configuration finished
macbookproloreto:tensorflow admin$ cd ..
macbookproloreto:syntaxnet admin$ cd ..
macbookproloreto:models admin$ bazel test --linkopt=-headerpad_max_install_names syntaxnet/... util/utf8/...
The 'test' command is only supported from within a workspace.
macbookproloreto:models admin$ pwd
/Users/admin/Developmemt/AI/models
macbookproloreto:models admin$ ls
AUTHORS CONTRIBUTING.md LICENSE README README.md autoencoder inception neural_gpu swivel syntaxnet transformer
macbookproloreto:models admin$ cd syntaxnet/
macbookproloreto:syntaxnet admin$ ls
README.md ff_nn_schematic.png syntaxnet tools
WORKSPACE looping-parser.gif tensorflow util
beam_search_training.png sawman.png third_party
macbookproloreto:syntaxnet admin$ bazel test --linkopt=-headerpad_max_install_names syntaxnet/... util/utf8/...
Sending SIGTERM to previous Bazel server (pid=59421)... done.
.........
so the problems were: (1) bazel must be build 0.2.2 not the beta (2) the test must run from models/syntaxnet/
@calberti not sure why, but what I get now (after last pull):
macbookproloreto:syntaxnet admin$ bazel test --linkopt=-headerpad_max_install_names syntaxnet/... util/utf8/...
INFO: Found 65 targets and 12 test targets...
FAIL: //syntaxnet:reader_ops_test (see /private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/reader_ops_test/test.log).
FAIL: //syntaxnet:lexicon_builder_test (see /private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/lexicon_builder_test/test.log).
FAIL: //syntaxnet:text_formats_test (see /private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/text_formats_test/test.log).
FAIL: //syntaxnet:beam_reader_ops_test (see /private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/beam_reader_ops_test/test.log).
FAIL: //syntaxnet:parser_trainer_test (see /private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/parser_trainer_test/test.log).
FAIL: //syntaxnet:graph_builder_test (see /private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/graph_builder_test/test.log).
INFO: Elapsed time: 1,924s, Critical Path: 1,35s
//syntaxnet:arc_standard_transitions_test (cached) PASSED in 0,3s
//syntaxnet:parser_features_test (cached) PASSED in 0,2s
//syntaxnet:sentence_features_test (cached) PASSED in 0,4s
//syntaxnet:shared_store_test (cached) PASSED in 5,2s
//syntaxnet:tagger_transitions_test (cached) PASSED in 0,4s
//util/utf8:unicodetext_unittest (cached) PASSED in 0,1s
//syntaxnet:beam_reader_ops_test FAILED in 0,4s
/private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/beam_reader_ops_test/test.log
//syntaxnet:graph_builder_test FAILED in 0,4s
/private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/graph_builder_test/test.log
//syntaxnet:lexicon_builder_test FAILED in 0,5s
/private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/lexicon_builder_test/test.log
//syntaxnet:parser_trainer_test FAILED in 0,4s
/private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/parser_trainer_test/test.log
//syntaxnet:reader_ops_test FAILED in 0,5s
/private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/reader_ops_test/test.log
//syntaxnet:text_formats_test FAILED in 0,5s
/private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/text_formats_test/test.log
Executed 6 out of 12 tests: 6 tests pass and 6 fail locally.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
Hey so I just tested this again on Mac cloning the models repo from scratch, and it still seems to work for me. Could you look into the test logs to see what's wrong? Eg. less /private/var/tmp/_bazel_admin/7de5e8ad26205d6f3b147001f8f93014/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/beam_reader_ops_test/test.log
Is it possible that you pulled the models repo, but that didn't update the version of the tensorflow submodule?