Skip to content

Corrupted model.pth.tar-6 #2

@xwjabc

Description

@xwjabc

Thank you for your great work! I tried to generate the category embedding using the provided checkpoint promptdet_resources/prompt_learner/lvis/model.pth.tar-6 in the following command

# stage-I: generate the category embeddings
python tools/promptdet/gen_category_embedding.py --model-file promptdet_resources/prompt_learner/lvis/model.pth.tar-6 --name-file promptdet_resources/lvis_category_and_description.txt --out-file promptdet_resources/reproduce_lvis_category_embeddings.pt

However, it shows error RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

The same error also occurs when I directly load the checkpoint file using torch.load():

>>> import torch
>>> x = torch.load("promptdet_resources/prompt_learner/lvis/model.pth.tar-6")

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/weijianxu/anaconda3/envs/dassl/lib/python3.8/site-packages/torch/serialization.py", line 705, in load
    with _open_zipfile_reader(opened_file) as opened_zipfile:
  File "/home/weijianxu/anaconda3/envs/dassl/lib/python3.8/site-packages/torch/serialization.py", line 242, in __init__
    super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

Based on the above observations, I think the error probably comes from the corrupted model.pth.tar-6 file. My PyTorch version is 1.12.1 but I also tried PyTorch 1.9.0 and got the same error message. Thus, I wonder if the authors could check the completeness of the checkpoint and may provide an updated version. Thanks!

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