2

我跑了bazel test syntaxnet/... util/utf8/...,它给了我这个输出:

FAIL: //syntaxnet:parser_trainer_test (see /home/me/.cache/bazel/_bazel_rushat/cc4d67663fbe887a603385d628fdf383/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/parser_trainer_test/test.log).
INFO: Elapsed time: 2179.396s, Critical Path: 1623.00s
//syntaxnet:arc_standard_transitions_test                                PASSED in 0.7s
//syntaxnet:beam_reader_ops_test                                         PASSED in 24.1s
//syntaxnet:graph_builder_test                                           PASSED in 14.6s
//syntaxnet:lexicon_builder_test                                         PASSED in 6.1s
//syntaxnet:parser_features_test                                         PASSED in 5.8s
//syntaxnet:reader_ops_test                                              PASSED in 9.4s
//syntaxnet:sentence_features_test                                       PASSED in 0.2s
//syntaxnet:shared_store_test                                            PASSED in 41.7s
//syntaxnet:tagger_transitions_test                                      PASSED in 5.2s
//syntaxnet:text_formats_test                                            PASSED in 6.1s
//util/utf8:unicodetext_unittest                                         PASSED in 0.4s
//syntaxnet:parser_trainer_test                                          FAILED in 0.5s
  /home/me/.cache/bazel/_bazel_me/cc4d67663fbe887a603385d628fdf383/syntaxnet/bazel-out/local-opt/testlogs/syntaxnet/parser_trainer_test/test.log

Executed 12 out of 12 tests: 11 tests pass and 1 fails 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.

如果您想要 的输出--test_verbose_timeout_warnings,请询问。

Test.log 输出如下,因为 Stackoverflow 告诉我我的帖子中有太多代码:/

谢谢!


test.log 输出:

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
-----------------------------------------------------------------------------
+ BINDIR=/home/me/.cache/bazel/_bazel_me/cc4d67663fbe887a603385d628fdf383/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles/syntaxnet
+ CONTEXT=/home/me/.cache/bazel/_bazel_me/cc4d67663fbe887a603385d628fdf383/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=OUTPATH=/tmp/syntaxnet-output=
+ sed s=SRCDIR=/home/me/.cache/bazel/_bazel_me/cc4d67663fbe887a603385d628fdf383/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles= /home/me/.cache/bazel/_bazel_me/cc4d67663fbe887a603385d628fdf383/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles/syntaxnet/testdata/context.pbtxt
sed: can't read /home/me/.cache/bazel/_bazel_me/cc4d67663fbe887a603385d628fdf383/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles/syntaxnet/testdata/context.pbtxt: No such file or directory
+ PARAMS=128-0.08-3600-0.9-0
+ /home/me/.cache/bazel/_bazel_me/cc4d67663fbe887a603385d628fdf383/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles/syntaxnet/parser_trainer --arg_prefix=brain_parser --batch_size=32 --compute_lexicon --decay_steps=3600 --graph_builder=greedy --hidden_layer_sizes=128 --learning_rate=0.08 --momentum=0.9 --output_path=/tmp/syntaxnet-output --task_context=/tmp/syntaxnet-output/context --training_corpus=training-corpus --tuning_corpus=tuning-corpus --params=128-0.08-3600-0.9-0 --num_epochs=12 --report_every=100 --checkpoint_every=1000 --logtostderr
syntaxnet/parser_trainer_test: line 36: /home/me/.cache/bazel/_bazel_me/cc4d67663fbe887a603385d628fdf383/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_trainer_test.runfiles/syntaxnet/parser_trainer: No such file or directory
4

2 回答 2

2

这是 syntaxnet 测试中的一个错误,它正在寻找错误的路径。它需要以下补丁:

diff --git a/syntaxnet/syntaxnet/parser_trainer_test.sh b/syntaxnet/syntaxnet/parser_trainer_test.sh
index ba2a6e7..977c89c 100755
--- a/syntaxnet/syntaxnet/parser_trainer_test.sh
+++ b/syntaxnet/syntaxnet/parser_trainer_test.sh
@@ -22,7 +22,7 @@

 set -eux

-BINDIR=$TEST_SRCDIR/syntaxnet
+BINDIR=$TEST_SRCDIR/$TEST_WORKSPACE/syntaxnet
 CONTEXT=$BINDIR/testdata/context.pbtxt
 TMP_DIR=/tmp/syntaxnet-output
于 2016-06-15T21:08:19.180 回答
1

您需要安装正确的 bazel 版本才能编译 syntaxnet。我有最新的版本,但它不起作用。所以我通过删除文件夹来删除它

rm -fr .cache/bazel 

然后通过从下载页面下载正确的安装程序重新安装正确的版本 bazel==0.2.2b

并在我的机器上运行它

sudo chmod +x bazel-version.sh
./bazel-version.sh --user
于 2016-06-16T11:10:29.750 回答