You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When computing fbank, the newer version of lhotse tripped at compute_and_store_features, inside the compute_fbank_xxx.py file. I suspect it might have something to do with the cut.py refactor.
The error message is below.
root@2313535c79e8:/workspace/icefall/egs/csj/ASR# python local/compute_fbank_tedxjp10k.py --manifest-dir data/manifests --fbank-dir /mnt/minami_data_server/t2131178/corpus/TEDxJP-10K_v1.1/fbank
2022-10-04 10:22:37,936 INFO [compute_fbank_tedxjp10k.py:37] Manifests read.
2022-10-04 10:22:37,951 INFO [compute_fbank_tedxjp10k.py:45] Processing new
/opt/conda/lib/python3.7/site-packages/lhotse/lazy.py:395: UserWarning: A lambda was passed to LazyMapper: it may prevent you from forking this process. If you experience issues with num_workers > 0 in torch.utils.data.DataLoader, try passing a regular function instead.
"A lambda was passed to LazyMapper: it may prevent you from forking this process. "
Traceback (most recent call last):
File "local/compute_fbank_tedxjp10k.py", line 114, in
main()
File "local/compute_fbank_tedxjp10k.py", line 106, in main
num_mel_bins = 80
File "local/compute_fbank_tedxjp10k.py", line 65, in compute_fbank_csj
storage_type=ChunkedLilcomHdf5Writer
File "/opt/conda/lib/python3.7/site-packages/lhotse/cut/set.py", line 1455, in compute_and_store_features
cut_sets = self.split(num_jobs, shuffle=True)
File "/opt/conda/lib/python3.7/site-packages/lhotse/cut/set.py", line 541, in split
self, num_splits=num_splits, shuffle=shuffle, drop_last=drop_last
File "/opt/conda/lib/python3.7/site-packages/lhotse/utils.py", line 331, in split_sequence
seq = list(seq)
File "/opt/conda/lib/python3.7/site-packages/lhotse/cut/set.py", line 1988, in len
return len(self.cuts)
File "/opt/conda/lib/python3.7/site-packages/lhotse/lazy.py", line 231, in len
return sum(len(it) for it in self.iterators)
File "/opt/conda/lib/python3.7/site-packages/lhotse/lazy.py", line 231, in
return sum(len(it) for it in self.iterators)
File "/opt/conda/lib/python3.7/site-packages/lhotse/lazy.py", line 432, in len
"LazyFlattener does not support len because it would require "
NotImplementedError: LazyFlattener does not support len because it would require iterating over the whole iterator, which is not possible in a lazy fashion. If you really need to know the length, convert to eager mode first using .to_eager(). Note that this will require loading the whole iterator into memory.
Below is my code. My supervisions and recordings are simple json files, so they are not supposed to be loaded lazily. I am not sure if there is a way to circumvent this lazy loading.
Ah, I see what is the issue. I should fix it in Lhotse so that compute_and_store_features works with lazy manifests. In the meantime, you can add this line to fix it on your end: cut_set = cut_set.to_eager() (just before computing features).
When computing fbank, the newer version of lhotse tripped at
compute_and_store_features
, inside the compute_fbank_xxx.py file. I suspect it might have something to do with the cut.py refactor.The error message is below.
Below is my code. My supervisions and recordings are simple json files, so they are not supposed to be loaded lazily. I am not sure if there is a way to circumvent this lazy loading.
Below is my lhotse verison.
lhotse 1.9.0.dev0+git.97bf4b0.clean pypi_0 pypi
It is okay if this cannot be easily resolved. I am using an older docker image that did not incorporate the cut.py refactor to compute fbanks.
The text was updated successfully, but these errors were encountered: