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

Error when building docker #70

Closed
wonkyuml opened this issue Apr 25, 2019 · 2 comments
Closed

Error when building docker #70

wonkyuml opened this issue Apr 25, 2019 · 2 comments

Comments

@wonkyuml
Copy link

wonkyuml commented Apr 25, 2019

It failed while installing kiwisolver.

  Building wheel for kiwisolver (setup.py): started
  Building wheel for kiwisolver (setup.py): finished with status 'error'
  ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-AG6Mos/kiwisolver/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-OM6uPW --python-tag cp27:
  ERROR: running bdist_wheel
  running build
  running build_ext
  building 'kiwisolver' extension
  creating build
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/py
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c py/kiwisolver.cpp -o build/temp.linux-x86_64-2.7/py/kiwisolver.o
  cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
  In file included from ./kiwi/constraint.h:13:0,
                   from ./kiwi/kiwi.h:9,
                   from py/kiwisolver.cpp:9:
  ./kiwi/strength.h:30:14: warning: 'kiwi::strength::strong' defined but not used [-Wunused-variable]
   const double strong = create( 1.0, 0.0, 0.0 );
                ^
  ./kiwi/strength.h:32:14: warning: 'kiwi::strength::medium' defined but not used [-Wunused-variable]
   const double medium = create( 0.0, 1.0, 0.0 );
                ^
  ./kiwi/strength.h:34:14: warning: 'kiwi::strength::weak' defined but not used [-Wunused-variable]
   const double weak = create( 0.0, 0.0, 1.0 );
                ^
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c py/constraint.cpp -o build/temp.linux-x86_64-2.7/py/constraint.o
  cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c py/expression.cpp -o build/temp.linux-x86_64-2.7/py/expression.o
  cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c py/solver.cpp -o build/temp.linux-x86_64-2.7/py/solver.o
  cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c py/strength.cpp -o build/temp.linux-x86_64-2.7/py/strength.o
  cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
  py/strength.cpp:92:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
   };
   ^
  py/strength.cpp:92:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  py/strength.cpp:92:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  py/strength.cpp:92:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  py/strength.cpp:92:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  py/strength.cpp:92:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  py/strength.cpp:92:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  py/strength.cpp:92:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c py/term.cpp -o build/temp.linux-x86_64-2.7/py/term.o
  cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c py/variable.cpp -o build/temp.linux-x86_64-2.7/py/variable.o
  cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
  creating build/lib.linux-x86_64-2.7
  c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/py/kiwisolver.o build/temp.linux-x86_64-2.7/py/constraint.o build/temp.linux-x86_64-2.7/py/expression.o build/temp.linux-x86_64-2.7/py/solver.o build/temp.linux-x86_64-2.7/py/strength.o build/temp.linux-x86_64-2.7/py/term.o build/temp.linux-x86_64-2.7/py/variable.o -o build/lib.linux-x86_64-2.7/kiwisolver.so
  c++: error: unrecognized command line option '-Wdate-time'
  c++: error: unrecognized command line option '-fstack-protector-strong'
  c++: error: unrecognized command line option '-Wdate-time'
  c++: error: unrecognized command line option '-fstack-protector-strong'
  error: command 'c++' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for kiwisolver
@jonathanasdf
Copy link
Contributor

Please try deleting everything and starting fresh, and check if there are earlier errors like g++ not being installed properly.

@wonkyuml
Copy link
Author

thanks it works. closing.

copybara-service bot pushed a commit that referenced this issue Oct 24, 2021
…els.

Highlights:

1. Introducing additional terminating condition "force_last_chunk_eoc_in_topk". This option is in spirit similar to the existing "force_eos_in_topk". If force_last_chunk_eoc_in_topk set to True, when the local score of last chunk eoc is not high enough to enter the top-(k+2) extensions of the input hyp, we force it to be included. This makes it easier to terminate by last chunk eoc. Even with the rest changes, this modification was crucial to bring down the TPU WER for voice search to 6.4% from around 17.0% (see b/199517196, #70). In the unit test of beam_search_equivalence_test.py, this option helps the voice search model to terminate on the "triumphal ornaments" utterance even for the cpu beam search helper. The implementation of this logic was recently checked in for the cpu beam search helper in cl/402971620, and here we test the equivalence with real model and data.

2. Writing a new merge_hyps operation to perform exact path merging. This is achieved by maintaining the token history for active hyps, similarly to the "prev_labels" field of the Hyp structure in cpu beam search. The proposed implementation does not use any loop and shall be time efficient. Also the history is overwritten at each step, and we do not store this info across all decoding steps. The time and memory complexity for merge_hyps is of the order O(num_beams * num_hyps_per_beam^2 * target_seq_len) and in our typical RNN-T use case, num_beams=32, num_hyps_per_beam=4 or 8, target_seq_len=256 for EMBR training; such complexity shall be affordable. Note the previous merge_hyps implementation uses hash maps to approximately maintain hyp history, and it was observed that hash map collision occur frequently (see b/199517196, #51), causing the merged score to be wrong.

Other changes:

3. Providing the option to disable fast gather of float32 and bool matrices by matmul, throughout the tpu beam search helper. It was observed that matmul may cause severe loss of precision, see cl/402747554 and b/199517196 (#52).

4. Switched the order of merge_hyps and determining terminating hyps. Previously we merge hyps before terminating, and thus it is possible that a last chunk eoc (last frame blank) is merged and this extension is killed, making it harder to terminate the hyp.

5. Move last chunk eoc off the beam regardless of whether it can terminate. The reason is that if a eoc extension survives pruning, it will advance frame index for RNN-T models. And if a last chunk eoc survives pruning, it will try to move frame index out of bound (though we do have safeguard for this in steps/rnnt_features.py).

6. Due to changes 4 and 5, we now handle terminations before merging hyps, and therefore terminating scores are not merged to active hyps. I think this is the correct behavior and is consistent with CPU beam search. Another advantage with this change is that we can now perform top-k selection directly on the remaining extensions (there are k * (k+2) of them) without any more eos and eoc tokens. This allows us to completely remove the confusing 2*k pre-selection logic in previous implementation.

7. Introduced new option "combine_eos_and_eoc_strategy". When both eoc and eos can terminate the hypothesis, this option specifies whether to use the higher score (what TPU beam search was using) or the lower score (what the CPU beam search has been using).

PiperOrigin-RevId: 405278044
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

2 participants