Skip to content

Loading exception in evaluation phase  #236

@Salvatore-tech

Description

@Salvatore-tech

Hello,
I get the following exception when trying to load a finetuned model...Could you give any hints?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/salvatore/.local/lib/python3.7/site-packages/torch/serialization.py", line 595, in _load
    return legacy_load(f)
  File "/home/salvatore/.local/lib/python3.7/site-packages/torch/serialization.py", line 506, in legacy_load
    with closing(tarfile.open(fileobj=f, mode='r:', format=tarfile.PAX_FORMAT)) as tar, \
  File "/opt/share/sw/anaconda/anaconda3/lib/python3.7/tarfile.py", line 1591, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/opt/share/sw/anaconda/anaconda3/lib/python3.7/tarfile.py", line 1621, in taropen
    return cls(name, mode, fileobj, **kwargs)
  File "/opt/share/sw/anaconda/anaconda3/lib/python3.7/tarfile.py", line 1484, in __init__
    self.firstmember = self.next()
  File "/opt/share/sw/anaconda/anaconda3/lib/python3.7/tarfile.py", line 2301, in next
    raise ReadError(str(e))
tarfile.ReadError: invalid header

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "submission.py", line 55, in <module>
    state_dict = torch.load(args.loadmodel)
  File "/home/salvatore/.local/lib/python3.7/site-packages/torch/serialization.py", line 426, in load
    return _load(f, map_location, pickle_module, **pickle_load_args)
  File "/home/salvatore/.local/lib/python3.7/site-packages/torch/serialization.py", line 599, in _load
    raise RuntimeError("{} is a zip archive (did you mean to use torch.jit.load()?)".format(f.name))
RuntimeError: ./finetuned/checkpoint_100.tar is a zip archive (did you mean to use torch.jit.load()?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions