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

Run onnx_check.py RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found #1760

Open
kellkwang opened this issue Sep 27, 2024 · 1 comment

Comments

@kellkwang
Copy link

2024-09-27 09:30:11,541 INFO [onnx_check.py:201] {'jit_filename': 'exp/zipformer_large/epoch-2.pt', 'onnx_encoder_filename': 'exp/zipformer_onnx/encoder-epoch-2-avg-1.onnx', 'onnx_decoder_filename': 'exp/zipformer_onnx/decoder-epoch-2-avg-1.onnx', 'onnx_joiner_filename': 'exp/zipformer_onnx/joiner-epoch-2-avg-1.onnx'}
Traceback (most recent call last):
File "./zipformer/onnx_check.py", line 240, in
main()
File "/home/kell/anaconda3/envs/icefall/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "./zipformer_t/onnx_check.py", line 203, in main
torch_model = torch.jit.load(args.jit_filename)
File "/home/kell/anaconda3/envs/icefall/lib/python3.8/site-packages/torch/jit/_serialization.py", line 162, in load
cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)
RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found

@csukuangfj
Copy link
Collaborator

what is the output of

ls -lh exp/zipformer_large/epoch-2.pt

Please make sure your model files exist and the paths your passed to the script are also valid.

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

2 participants