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

Something wrong with the model file? #27

Open
AnkushMalaker opened this issue Nov 22, 2024 · 0 comments
Open

Something wrong with the model file? #27

AnkushMalaker opened this issue Nov 22, 2024 · 0 comments

Comments

@AnkushMalaker
Copy link

I get an unpickling error while following the steps on the README to setup the env, ie,

  1. Create a .venv with python3 -m venv .venv. Source it.
  2. Install current project with pip install .
  3. Use specified command: reverb --model reverb_asr_v1 --audio_file audio.mp3 --result_dir results
  warnings.warn(
Traceback (most recent call last):
  File "/path/to/venv/bin/reverb", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/path/to/reverb/asr/wenet/bin/recognize_wav.py", line 165, in main
    reverb_model = load_model(args.model)
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/reverb/asr/wenet/cli/reverb.py", line 354, in load_model
    return ReverbASR(
           ^^^^^^^^^^
  File "/path/to/reverb/asr/wenet/cli/reverb.py", line 78, in __init__
    self.model, self.configs = init_model(self, self.configs)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/reverb/asr/wenet/utils/init_model.py", line 240, in init_model
    infos = load_checkpoint(model, args.checkpoint, def_strict=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/reverb/asr/wenet/utils/checkpoint.py", line 35, in load_checkpoint
    global_checkpoint = torch.load(path, map_location='cpu')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/venv/lib/python3.12/site-packages/torch/serialization.py", line 1040, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/venv/lib/python3.12/site-packages/torch/serialization.py", line 1258, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_pickle.UnpicklingError: invalid load key, 'v'.

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

1 participant