k2-fsa / snowfall

Moved to https://github.com/k2-fsa/icefall
Apache License 2.0
144 stars 42 forks source link

train model one error #58

Closed shanguanma closed 3 years ago

shanguanma commented 3 years ago

Hi, All, I download currently k2 master(2020-12-23), then compile it via the below command

$ conda create -n k2-fsa python=3.7
$ conda activate k2-fas
$  conda install pytorch==1.7.1 cudatoolkit=10.1 -c pytorch
$ conda install -c pytorch torchaudio

$ git clone https://github.com/k2-fsa/k2.git
$ cd k2
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make _k2
$ cd ..
$ pip3 install wheel twine
$ ./scripts/build_pip.sh

# Have a look at the `dist/` directory.
$ pip install dist/k2-0.1.1.dev20201223-cp37-cp37m-linux_x86_64.whl
# for test
$ cd build
$ make -j
$ ctest --parallel 5
$ make test

But I got one error in test mode,

99% tests passed, 1 tests failed out of 70

Total Test time (real) = 129.64 sec

The following tests FAILED:
     42 - fsa_test_py (Failed)
Errors while running CTest
Makefile:91: recipe for target 'test' failed
make: *** [test] Error 8

When I run the run.sh --stage 6 in snowfall. it appears the following error.

(k2-fsa) ntu-dso@ntudso-X9DA7-E:~/w2020/k2-fsa/snowfall/egs/librispeech/asr/simple_v1$ ./run.sh --stage 6
/home/ntu-dso/miniconda3/envs/k2-fsa/lib/python3.7/site-packages/torchaudio/backend/utils.py:54: UserWarning: "sox" backend is being deprecated. The default backend will be changed to "sox_io" backend in 0.8.0 and "sox" backend will be removed in 0.9.0. Please migrate to "sox_io" backend. Please refer to https://github.com/pytorch/audio/issues/903 for the detail.
  '"sox" backend is being deprecated. '
/home/ntu-dso/miniconda3/envs/k2-fsa/lib/python3.7/site-packages/lhotse/augmentation/torchaudio.py:13: UserWarning: Torchaudio SoX effects chains are only introduced in version 0.7 - please upgrade your PyTorch to 1.7+ and torchaudio to 0.7+ to use them.
  warnings.warn('Torchaudio SoX effects chains are only introduced in version 0.7 - '
Loading L.fst
[F] /home/ntu-dso/w2020/k2-fsa/k2/k2/csrc/fsa_utils.cu:k2::Fsa k2::OpenFstTransducerFromStream(std::istringstream&, k2::Array1<int>*):500 Check failed: error == false (1 vs. 0) 

[ Stack-Trace: ]
/home/ntu-dso/miniconda3/envs/k2-fsa/lib/python3.7/site-packages/libk2_log.so(k2::internal::GetStackTrace()+0x47) [0x7fd79fb743c7]
/home/ntu-dso/miniconda3/envs/k2-fsa/lib/python3.7/site-packages/libk2context.so(k2::internal::Logger::~Logger()+0x4d) [0x7fd79fe4b8fd]
/home/ntu-dso/miniconda3/envs/k2-fsa/lib/python3.7/site-packages/libk2context.so(k2::FsaFromString(std::string const&, bool, k2::Array1<int>*)+0x2e42) [0x7fd79ff24ad2]
/home/ntu-dso/miniconda3/envs/k2-fsa/lib/python3.7/site-packages/_k2.cpython-37m-x86_64-linux-gnu.so(+0x3a205) [0x7fd7a304f205]
/home/ntu-dso/miniconda3/envs/k2-fsa/lib/python3.7/site-packages/_k2.cpython-37m-x86_64-linux-gnu.so(+0x193e3) [0x7fd7a302e3e3]
python3(_PyMethodDef_RawFastCallKeywords+0x274) [0x5629fd849914]
python3(_PyCFunction_FastCallKeywords+0x21) [0x5629fd849a31]
python3(_PyEval_EvalFrameDefault+0x4e1d) [0x5629fd8b5ebd]
python3(_PyEval_EvalCodeWithName+0x2f9) [0x5629fd7f8829]
python3(_PyFunction_FastCallKeywords+0x387) [0x5629fd849107]
python3(_PyEval_EvalFrameDefault+0x14e5) [0x5629fd8b2585]
python3(_PyFunction_FastCallKeywords+0xfb) [0x5629fd848e7b]
python3(_PyEval_EvalFrameDefault+0x416) [0x5629fd8b14b6]
python3(_PyEval_EvalCodeWithName+0x2f9) [0x5629fd7f8829]
python3(PyEval_EvalCodeEx+0x44) [0x5629fd7f9714]
python3(PyEval_EvalCode+0x1c) [0x5629fd7f973c]
python3(+0x22cf14) [0x5629fd910f14]
python3(PyRun_FileExFlags+0xa1) [0x5629fd91b331]
python3(PyRun_SimpleFileExFlags+0x1c3) [0x5629fd91b523]
python3(+0x238655) [0x5629fd91c655]
python3(_Py_UnixMain+0x3c) [0x5629fd91c77c]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fd814658bf7]
python3(+0x1dcff0) [0x5629fd8c0ff0]

./run.sh: line 47: 26020 Aborted                 (core dumped) python3 ./train.py
csukuangfj commented 3 years ago

The following tests FAILED: 42 - fsa_test_py (Failed)

Could you post the result of:

cd build
ctest --output-on-failure -R fsa_test_py -E host
csukuangfj commented 3 years ago

./run.sh --stage 6

Please change stage in run.sh manually. There is no parse_options.sh in run.sh.

csukuangfj commented 3 years ago

please make sure that you have finished running stage 1 to stage 5 sucessfully.

shanguanma commented 3 years ago

Thanks a lot. @csukuangfj

Please change stage in run.sh manually. There is no parse_options.sh in run.sh.

I have add the file to run.sh

please make sure that you have finished running stage 1 to stage 5 sucessfully.

I have checked out the error, because L.fas.txt is empty.