kaldi-asr / kaldi

kaldi-asr/kaldi is the official location of the Kaldi project.
http://kaldi-asr.org
Other
14.12k stars 5.31k forks source link

Set PYTHONUNBUFFERED=1 in all recipes #4770

Closed ma08 closed 2 years ago

ma08 commented 2 years ago

To force stdout, stderr to be unbuffered for python scripts. Without this setting, parts of the stream might be lost in a few cases. Relevant mainly for python versions <3.7.

Discussion regarding this PR in kaldi-developers Google Group : https://groups.google.com/g/kaldi-developers/c/YEJugk2J9Xw

jtrmal commented 2 years ago

could we just do

PYTHONUNBUFFERED=1

please? Uppercased TRUE is not nice and doesn't mesh well with neither python nor bash

ma08 commented 2 years ago

@jtrmal Oops. Sure!

Shall I create a new PR or make changes to the existing one with a new commit?

Edit: Made a new commit using 1 instead of TRUE.

ma08 commented 2 years ago

@jtrmal let me know if any other issues.

It's a single line change in all the files (addition of the line). Number of files changed is 139 which matches the number of path.sh file in egs

sourya4@IWeighHar:~/pro/columbia/spring22/fund_sp_rec/kaldi_fork$ find egs/ -name "path.sh" | wc -l
139
jtrmal commented 2 years ago

looks good, thanks!