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

RuntimeError: Expected hasRecord("version") to be true, but got false. #15

Open
JornyWan opened this issue Aug 16, 2023 · 1 comment
Open

Comments

@JornyWan
Copy link

sorry, i try to evaluate your trained model directly, but received this error:

Traceback (most recent call last):
File "eval_scripts/eval_longmem_icl.py", line 168, in
main(args)
File "eval_scripts/eval_longmem_icl.py", line 99, in main
model, _ = load_model_ensemble([args.path], arg_overrides=override_args, task=None)
File "/data/cwan38/trial/LongMem/fairseq/fairseq/checkpoint_utils.py", line 367, in load_model_ensemble
ensemble, args, _task = load_model_ensemble_and_task(
File "/data/cwan38/trial/LongMem/fairseq/fairseq/checkpoint_utils.py", line 425, in load_model_ensemble_and_task
state = load_checkpoint_to_cpu(filename, arg_overrides)
File "/data/cwan38/trial/LongMem/fairseq/fairseq/checkpoint_utils.py", line 315, in load_checkpoint_to_cpu
state = torch.load(f, map_location=torch.device("cpu"))
File "/data/cwan38/anaconda3/envs/longmem/lib/python3.8/site-packages/torch/serialization.py", line 797, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/data/cwan38/anaconda3/envs/longmem/lib/python3.8/site-packages/torch/serialization.py", line 283, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: Expected hasRecord("version") to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)

@JornyWan
Copy link
Author

JornyWan commented Sep 9, 2023

anyone can fix this?

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