Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

error when PytorchStreamReader failed reading file #186

Open
yujunlhz opened this issue May 7, 2021 · 2 comments
Open

error when PytorchStreamReader failed reading file #186

yujunlhz opened this issue May 7, 2021 · 2 comments

Comments

@yujunlhz
Copy link

yujunlhz commented May 7, 2021

python3 ./mmi_bigram_train.py

World size: 1 Rank: 0
Traceback (most recent call last):
File "./mmi_bigram_train.py", line 502, in
main()
File "./mmi_bigram_train.py", line 280, in main
lexicon = Lexicon(lang_dir)
File "/tmp/lingvo/snowfall/build/lib/snowfall/lexicon.py", line 21, in init
L_inv = k2.Fsa.from_dict(torch.load(self.lang_dir / 'Linv.pt'))
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 592, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 851, in _load
result = unpickler.load()
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 843, in persistent_load
load_tensor(data_type, size, key, _maybe_decode_ascii(location))
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 831, in load_tensor
storage = zip_file.get_storage_from_record(name, size, dtype).storage()
RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading file data/57885792: invalid header or archive is corrupted

k2 0.3.3+cu102.dev20210507
kaldialign 0.1.7
keyring 23.0.1
lhotse 0.6.0
lilcom 1.1.1
Markdown 3.3.4
numpy 1.20.2
torch 1.8.1+cu102
torchaudio 0.8.1

what might be the culprit?
Thanks

@danpovey
Copy link
Contributor

danpovey commented May 7, 2021 via email

@yujunlhz
Copy link
Author

yujunlhz commented May 7, 2021

it turn out that Linv.pt was generated with a another version. thanks

@yujunlhz yujunlhz changed the title error when run "python3 ./mmi_bigram_train.py" error when PytorchStreamReader failed reading file May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants