Skip to content
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

load module error #1485

Closed
jangjun21 opened this issue Oct 9, 2022 · 2 comments
Closed

load module error #1485

jangjun21 opened this issue Oct 9, 2022 · 2 comments

Comments

@jangjun21
Copy link

python version:3.8.12
torch version:1.10.0

./decoder_main --chunk_size -1 --model_path ~/models/20220506_u2pp_conformer_exp/final.pt --dict_path ~/models/20220506_u2pp_conformer_libtorch/words.txt --wav_path ~/records/testwav/tts/new/04a939cfa1d82dc5a6e2cb3dcf952e84.wav

terminate called after throwing an instance of 'c10::Error'
what(): PytorchStreamReader failed locating file constants.pkl: file not found
Exception raised from valid at ../caffe2/serialize/inline_container.cc:158 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x42 (0x7f0ec9a5b4b2 in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x5b (0x7f0ec9a57dbb in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libc10.so)
frame #2: caffe2::serialize::PyTorchStreamReader::valid(char const*, char const*) + 0x8e (0x7f0eb658580e in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #3: caffe2::serialize::PyTorchStreamReader::getRecordID(std::string const&) + 0x47 (0x7f0eb65859d7 in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #4: caffe2::serialize::PyTorchStreamReader::getRecord(std::string const&) + 0x45 (0x7f0eb6585aa5 in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #5: torch::jit::readArchiveAndTensors(std::string const&, std::string const&, std::string const&, c10::optional<std::function<c10::StrongTypePtr (c10::QualifiedName const&)> >, c10::optional<std::function<c10::intrusive_ptr<c10::ivalue::Object, c10::detail::intrusive_target_default_null_typec10::ivalue::Object > (c10::StrongTypePtr, c10::IValue)> >, c10::optionalc10::Device, caffe2::serialize::PyTorchStreamReader&, std::shared_ptrtorch::jit::DeserializationStorageContext) + 0xa9 (0x7f0eb7a53419 in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #6: + 0x3c1d12b (0x7f0eb7a4d12b in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #7: + 0x3c1eab8 (0x7f0eb7a4eab8 in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #8: torch::jit::load(std::shared_ptrcaffe2::serialize::ReadAdapterInterface, c10::optionalc10::Device, std::unordered_map<std::string, std::string, std::hashstd::string, std::equal_tostd::string, std::allocator<std::pair<std::string const, std::string> > >&) + 0x1af (0x7f0eb7a4ff7f in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #9: torch::jit::load(std::string const&, c10::optionalc10::Device, std::unordered_map<std::string, std::string, std::hashstd::string, std::equal_tostd::string, std::allocator<std::pair<std::string const, std::string> > >&) + 0xad (0x7f0eb7a51f4d in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #10: torch::jit::load(std::string const&, c10::optionalc10::Device) + 0x54 (0x7f0eb7a52024 in /home/bmxm/wenet/runtime/server/x86/fc_base/libtorch-src/lib/libtorch_cpu.so)
frame #11: + 0x1d5e69 (0x55ec3e88ce69 in ./decoder_main)
frame #12: + 0x86682 (0x55ec3e73d682 in ./decoder_main)
frame #13: + 0x87094 (0x55ec3e73e094 in ./decoder_main)
frame #14: __libc_start_main + 0xe7 (0x7f0eb2538c87 in /lib/x86_64-linux-gnu/libc.so.6)
frame #15: + 0x85f1a (0x55ec3e73cf1a in ./decoder_main)

why have error about PytorchStreamReader failed locating file constants.pkl: file not found

@robin1001
Copy link
Collaborator

Please make sure you have got the latest code, version and model.

@jangjun21
Copy link
Author

Thank you.I have fixed the issue. using final.zip model format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants