-
Notifications
You must be signed in to change notification settings - Fork 309
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
Libriheavy train_bert_encoder.py incompatible with Lhotse 1.27.0 #1716
Comments
@juliendespres Hi, I think this is not a lhotse version problem based on the error log. It seems that your manifest does not have a field How did you generate your manifest? I tried this manifest(https://huggingface.co/datasets/pkufool/libriheavy/blob/main/libriheavy_cuts_small.jsonl.gz) and it seems to work fine. Could you please check if the manifest you are using has the field from lhotse import load_manifest_lazy
cuts = load_manifest_lazy("path/your_manifest.jsonl.gz")
print(cuts[0].supervisions[0].texts) |
OK, thank you very much, I understand the problem better now. It seems to me that the prepare.sh script is missing a step. Subsidiary question: is the script used to generate the downloaded manifests supplied anywhere? I hope that's clear enough and thank you again for your help. |
Thanks for reporting this bug. The custom fields are deleted in |
I regenerated the features and was able to start learning the BERT model. Everything seems to be working fine. |
Hi,
I'm trying to reproduce the PromtASR recipe but the script ./zipformer_prompt_asr/train_bert_encoder.py seems incompatible with Lhotse 1.27.0.
I got the following error :
Traceback (most recent call last):
File "/home/despres/source/git/k2/icefall/egs/libriheavy/ASR/./zipformer_prompt_asr/train_bert_encoder.py", line 1799, in
main()
...
File "/home/despres/miniconda3/envs/k2_2408/lib/python3.12/site-packages/lhotse/cut/set.py", line 2581, in iter
yield from self.cuts
File "/home/despres/source/git/k2/icefall/egs/libriheavy/ASR/./zipformer_prompt_asr/train_bert_encoder.py", line 1597, in remove_short_and_long_utt
tokens = sp.encode(c.supervisions[0].texts[0], out_type=str)
File "/home/despres/miniconda3/envs/k2_2408/lib/python3.12/site-packages/lhotse/custom.py", line 64, in getattr
raise AttributeError(f"No such attribute: {name}")
AttributeError: No such attribute: texts. Did you mean: 'text'?
I've just done a full install of K2(1.24.4)/Lhotse(1.27.0)/Icefall with the latest version and it doesn't change the problem.
Do I need to install a special version of Lhotse to use this recipe?
The text was updated successfully, but these errors were encountered: