k2-fsa / icefall

https://k2-fsa.github.io/icefall/
Apache License 2.0
931 stars 295 forks source link

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

Closed kellkwang closed 2 weeks ago

kellkwang commented 1 month ago

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 commented 1 month ago

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.

csukuangfj commented 2 weeks ago

Closing as no response has been received.