idiap / pkwrap

A pytorch wrapper for LF-MMI training and parallel training in Kaldi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation fault (core dumped)

zw76859420 opened this issue · comments

Thank you for open-sourcing such a great project. We have successfully installed pkwrap,but when import this tool, it will throws the following question:
"
Type "help", "copyright", "credits" or "license" for more information.

import pkwrap
Segmentation fault (core dumped)
"
And we use the following environment:
python 3.7.7
pytorch 1.7.0+cuda10.1
kaldi 2020 edition
gcc and g++ are all 5.4.0 edition

Looking forward to your reply
shylock

Hello,

Are you trying to run any particular script, or are you just trying to import it in a Python shell?

Srikanth

Dear Srikanth,
We just trying to import Pkwrapin a Python shell.
And we successfully installed pkwrap according to your prompt, but could not import Pkwrap.
Shylock

I see. Then please try importing torch first. In fact, try running

python test/test-import.py

to see if the test passes.

Other issues could be:

  1. Kaldi library is not in your $LD_LIBRARY_PATH. See here
  2. There is another library in your environment that is clashing with the Kaldi you used to compile pkwrap.

Let me know if that helps.

Thanks for your kind reply.
We first set Kaldi library in $LD_LIBRARY_PATH.
My torch version is '1.7.0+cu101'.
When we trying th run 'python test/test-import.py', it will also throw the following error.
"Segmentation fault (core dumped)"

I dont know how to solve this problem? and i also want to use lf-smbr loss function to train ASR acoustic model based on Pkwrap.

Shylock

We set Kaldi library just by the following code.
"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$KALDI_ROOT/src/lib/"

And we not use your method "Kaldi library is not in your $LD_LIBRARY_PATH. See [here]".

Could you please share the version of Kaldi (the output you get from git log)?

And which recipe/script in Kaldi runs lf-smbr loss? I can try to wrap it here. Currently, only the vanilla LF-MMI (both hybrid and E2E) is supported.

We use the newest kaldi from github, and can you tell me which version of kaldi you are using?
We refer to the lf-smbr written by vimal's github in “https://github.com/kaldi-asr/kaldi/pull/2140/commits/0bacc8371186561d8c6752cd21e67d7aaee615bb”

I recently test it with 6e633c9a from April 13, and it is working fine for me. I tested with CUDA 11.3 and Pytorch 1.11.

It is hard for me to find the exact bash script that does lf-smbr training. Could you please share the name of the file that I should be looking at?

Thanks Srikanth for your kind reply.
I'm very busy these days, and i'm so sorry it took so long to get back to your message
chain-smbr is open on vimal's github, you can get the code from: https://github.com/vimalmanohar/kaldi, and the branch is named "chain-smbr-fixed"

Best wishes,
Shylock

Dear Srikanth,
I want to know the CER gap between Kaldi(chain) and Pkwrap. Could you show me the comparation between the above two?

Thanks
Shylock

Hi,

I never checked CER. But the WER comparisons are here in the original report. You can also check the WERs in the recipes provided.

I have never tried lf-smbr, and it might be difficult to integrate it here since it is not there in the original Kaldi repository. Assuming the license for the lf-smbr code is the same as that of Kaldi (I think it is), I can help you demonstrate how to integrate it directly in a branch of this repo.

Thank you,
Srikanth

Ok, Thanks.
We will try Pkwrap after some time, and we can do more meaningful things with this Pkwrap tool.