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: unexpected EOF, expected 2051578 more bytes. The file might be corrupted. #223

Open
manapshymyr-OB opened this issue Aug 8, 2021 · 1 comment

Comments

@manapshymyr-OB
Copy link

Hello! @daniel-j-h Thank you for your project.

I am having an error during prediction:

sudo docker run --runtime=nvidia -it --rm -v $PWD:/data --ipc=host mapbox/robosat:latest-gpu predict --tile_size 512 --model /data/robosat/config/model-unet.toml --dataset /data/robosat/config/dataset-building.toml --checkpoint /data/robosat/checkpoint/checkpoint-00001-of-00010.pth /data/robosat/datasets /data/

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/src/app/robosat/tools/__main__.py", line 58, in <module>
    args.func(args)
  File "/usr/src/app/robosat/tools/predict.py", line 60, in main
    chkpt = torch.load(args.checkpoint, map_location=map_location)
  File "/opt/venv/lib/python3.6/site-packages/torch/serialization.py", line 387, in load
    return _load(f, map_location, pickle_module, **pickle_load_args)
  File "/opt/venv/lib/python3.6/site-packages/torch/serialization.py", line 581, in _load
    deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
RuntimeError: unexpected EOF, expected 2051578 more bytes. The file might be corrupted.
terminate called after throwing an instance of 'c10::Error'
  what():  owning_ptr == NullType::singleton() || owning_ptr->refcount_.load() > 0 ASSERT FAILED at /pytorch/c10/util/intrusive_ptr.h:350, please report a bug to PyTorch. intrusive_ptr: Can only intrusive_ptr::reclaim() owning pointers that were created using intrusive_ptr::release(). (reclaim at /pytorch/c10/util/intrusive_ptr.h:350)
frame #0: std::function<std::string ()>::operator()() const + 0x11 (0x7fb856a7d441 in /opt/venv/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x2a (0x7fb856a7cd7a in /opt/venv/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #2: THStorage_free + 0xca (0x7fb857a1729a in /opt/venv/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #3: <unknown function> + 0x53a157 (0x7fb89f421157 in /opt/venv/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #4: python3() [0x54f1c6]
frame #5: python3() [0x573420]
frame #6: python3() [0x4b1a48]
frame #7: python3() [0x5891e8]
frame #8: python3() [0x5add18]
frame #9: python3() [0x5add2e]
frame #10: python3() [0x5add2e]
frame #11: python3() [0x5add2e]
frame #12: python3() [0x5add2e]
frame #13: python3() [0x5add2e]
frame #14: python3() [0x56b906]
<omitting python frames>
frame #20: __libc_start_main + 0xe7 (0x7fb8c8cbbb97 in /lib/x86_64-linux-gnu/libc.so.6)

Aborted (core dumped)

I am running on my laptop, with GTX 1660TI. Do you think this is the reason for that? Furthermore, getting same error while trying with only CPU.
Can you please comment on that?

@daniel-j-h
Copy link
Collaborator

The error reads like your weight file is corrupted; hard to tell from the error alone, though.

By now this project is outdated, there are major pytorch version upgrades, and so on.

Please read the note in the readme, though, this project is no longer maintained, developed, or in any other form active

https://github.com/mapbox/robosat/blob/cbb1c73328183afd2d6351b7bfa3f430b73103ea/README.md

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

2 participants