models icon indicating copy to clipboard operation
models copied to clipboard

Executed 6 out of 12 tests: 6 tests pass and 6 fail locally

Open anbo724 opened this issue 10 years ago • 20 comments

I have installed bazel 0.2.2. But when I run bazel test syntaxnet/... util/utf8/... ,there are 6 test are not passed, how to fix it ? thanks

cc1plus: warning: unrecognized command line option "-Wno-self-assign" [enabled by default] FAIL: //syntaxnet:reader_ops_test (see /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/reader_ops_test/test.log). FAIL: //syntaxnet:beam_reader_ops_test (see /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/beam_reader_ops_test/test.log). FAIL: //syntaxnet:graph_builder_test (see /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/graph_builder_test/test.log). FAIL: //syntaxnet:lexicon_builder_test (see /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/lexicon_builder_test/test.log). FAIL: //syntaxnet:text_formats_test (see /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/text_formats_test/test.log). FAIL: //syntaxnet:parser_trainer_test (see /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/parser_trainer_test/test.log). INFO: Elapsed time: 341.488s, Critical Path: 294.82s //syntaxnet:arc_standard_transitions_test (cached) PASSED in 0.0s //syntaxnet:parser_features_test (cached) PASSED in 0.1s //syntaxnet:sentence_features_test (cached) PASSED in 0.1s //syntaxnet:shared_store_test (cached) PASSED in 0.4s //syntaxnet:tagger_transitions_test (cached) PASSED in 0.1s //util/utf8:unicodetext_unittest (cached) PASSED in 0.0s //syntaxnet:beam_reader_ops_test FAILED in 0.4s /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/beam_reader_ops_test/test.log //syntaxnet:graph_builder_test FAILED in 0.4s /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/graph_builder_test/test.log //syntaxnet:lexicon_builder_test FAILED in 0.5s /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/lexicon_builder_test/test.log //syntaxnet:parser_trainer_test FAILED in 0.6s /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/parser_trainer_test/test.log //syntaxnet:reader_ops_test FAILED in 0.4s /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/reader_ops_test/test.log //syntaxnet:text_formats_test FAILED in 0.5s /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/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.

anbo724 avatar May 14 '16 03:05 anbo724

The solution in my case (RedHat 6.5 64bit, python 2.7, gcc-4.8.4, java 1.8) is: bazel-0.2.2 test --linkopt=-lrt syntaxnet/... util/utf8/...

bug-fixed avatar May 16 '16 16:05 bug-fixed

I'm on OSX 10.11.5, java 1.8.0_91, bazel 0.2.2. Same issue as the one reported by @anbo724, all the same six tests fail.

bazel-0.2.2 test --linkopt=-lrt syntaxnet/... util/utf8/...

Trying this on OSX, instead of the --linkopt=-headerpad_max_install_names from the readme, actually causes all tests to return NO STATUS (1 failed to build and 11 were skipped).

ricardojmendez avatar May 17 '16 06:05 ricardojmendez

I had the same error; the problem was that I was using python 3. The project only works on python 2. See #110.

ljos avatar May 18 '16 16:05 ljos

@ljos Thanks for the pointer, but not the case for me. The default for me is Python 2.7.11.

ricardojmendez avatar May 18 '16 20:05 ricardojmendez

Did you read what it says in the test.log files? There might be a hint there. E.g. /home/shaoshu/.cache/bazel/_bazel_shaoshu/54e2b7109927b4e6e7831a50befed0b7/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/beam_reader_ops_test/test.log

ljos avatar May 19 '16 09:05 ljos

@ljos this is mine (/private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/graph_builder_test/) :

exec ${PAGER:-/usr/bin/less} "$0" || exit 1

Traceback (most recent call last): File "/private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/bin/syntaxnet/graph_builder_test.runfiles/syntaxnet/graph_builder_test.py", line 22, in import tensorflow as tf File "/private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/bin/syntaxnet/graph_builder_test.runfiles/external/tf/tensorflow/init.py", line 23, in from tensorflow.python import * File "/private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/bin/syntaxnet/graph_builder_test.runfiles/external/tf/tensorflow/python/init.py", line 45, in from tensorflow.python import pywrap_tensorflow File "/private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/bin/syntaxnet/graph_builder_test.runfiles/external/tf/tensorflow/python/pywrap_tensorflow.py", line 28, in _pywrap_tensorflow = swig_import_helper() File "/private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/bin/syntaxnet/graph_builder_test.runfiles/external/tf/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description) File "//anaconda/lib/python3.5/imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "//anaconda/lib/python3.5/imp.py", line 342, in load_dynamic return _load(spec) ImportError: dlopen(/private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/bin/syntaxnet/graph_builder_test.runfiles/external/tf/tensorflow/python/_pywrap_tensorflow.so, 10): Symbol not found: _PyCObject_Type Referenced from: /private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/bin/syntaxnet/graph_builder_test.runfiles/external/tf/tensorflow/python/_pywrap_tensorflow.so Expected in: flat namespace in /private/var/tmp/_bazel_user/d9234d1cba6e07cbf26abab4560c40f4/syntaxnet/bazel-out/local-opt/bin/syntaxnet/graph_builder_test.runfiles/external/tf/tensorflow/python/_pywrap_tensorflow.so

Same error for beam_reader_ops_test, lexicon_builder_test, etc

Also, I already set configuration (./configure command) to python2.7, I have no idea why File "//anaconda/lib/python3.5/imp.py".. occurs

pangeran-bottor avatar May 25 '16 15:05 pangeran-bottor

@pangeran-bottor Try to start clean with a new anaconda environment and set the configuration to that python. I think there is something wrong with your environment.

ljos avatar May 26 '16 11:05 ljos

I have the same issue. Exactly the same tests failed. My environment: Ubuntu 15.10, Python 2.7.11, JDK 8, Bazel 0.2.2b, gcc 5.2.1.

I read on stack overflow to increase the RAM size. But i already have 50GB of RAM and I dont think that is a solution. Any solution? Should I downgrade gcc to 4,8?

Because the error said the specified size is too big, I tried the command: bazel test syntaxnet/... util/utf8/... --local_resources 2048,2.0,1.0 --jobs 1 to limit the number of parallel jobs and limit the resources used but nothing works.

kskp avatar Jun 03 '16 03:06 kskp

@kskp If you post one of the error files it would be easier to debug. I would think that there is something wrong with your environment as well though.

ljos avatar Jun 03 '16 08:06 ljos

@ljos Do you want me to post the log files?

kskp avatar Jun 03 '16 14:06 kskp

Yes, one of them is probably enough.

ljos avatar Jun 03 '16 14:06 ljos

@ljos

exec ${PAGER:-/usr/bin/less} "$0" || exit 1

external/bazel_tools/tools/test/test-setup.sh: syntaxnet/text_formats_test: /usr/bin/python: bad interpreter: No such file or directory

This is what is there in the log file. What is the right interpreter? If it is python, I did update the PATH variable and also mentioned the right python location during the configure step.

kskp avatar Jun 03 '16 15:06 kskp

@kskp Do you use python 2? Could you try : which python, what is the output?

pangeran-bottor avatar Jun 03 '16 15:06 pangeran-bottor

@pangeran-bottor

sree@avlino:~/anaconda2/bin$ which python /home/sree/anaconda2/bin/python

And yes, I use Python 2.7.11.

kskp avatar Jun 03 '16 16:06 kskp

I created a softlink and it worked partially. I now have 11 tests passed and 1 test failed locally. The log file says:

BINDIR=/home/melvyn/.cache/bazel/_bazel_melvyn/74dc22424f44a6abb8ec23cb05763d3b/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles/syntaxnet

  • CONTEXT=/home/melvyn/.cache/bazel/_bazel_melvyn/74dc22424f44a6abb8ec23cb05763d3b/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles/syntaxnet/testdata/context.pbtxt
  • TMP_DIR=/tmp/syntaxnet-output
  • mkdir -p /tmp/syntaxnet-output
  • sed s=SRCDIR=/home/melvyn/.cache/bazel/_bazel_melvyn/74dc22424f44a6abb8ec23cb05763d3b/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles= /home/melvyn/.cache/bazel/_bazel_melvyn/74dc22424f44a6abb8ec23cb05763d3b/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles/syntaxnet/testdata/context.pbtxt
  • sed s=OUTPATH=/tmp/syntaxnet-output= syntaxnet/parser_trainer_test: line 31: /tmp/syntaxnet-output/context: Permission denied

kskp avatar Jun 04 '16 18:06 kskp

thks @zszhong you tips help me ,it works

dan6886 avatar Jun 07 '16 09:06 dan6886

A few solutions seem to have been posted for this issue. Please let me know if you're hitting one of these problems when running syntaxnet tests.

calberti avatar Jun 22 '16 15:06 calberti

The errors persist for me on OS X, but haven't had time to pursue further. Will elaborate once I can.

ricardojmendez avatar Jun 28 '16 14:06 ricardojmendez

I faced the same issue on OS X. It seems that it was caused by invalid python 2 pre-installed on OS X. The problem vanished after performing brew install python

genaforvena avatar Jul 03 '16 18:07 genaforvena

@genaforvena Thanks for the tip. I'm using Python 2.7.11 from homebrew myself, and looking on /Library/Frameworks/ I don't see any residue from the OS X-provided version, but that gives me something to pursue.

ricardojmendez avatar Jul 04 '16 06:07 ricardojmendez