uwaterlooir / golden-gaze Goto Github PK
View Code? Open in Web Editor NEWCode for the paper "Learning Trustworthy Web Sources to Derive Correct Answers and Reduce Health Misinformation in Search"
Code for the paper "Learning Trustworthy Web Sources to Derive Correct Answers and Reduce Health Misinformation in Search"
Loading the checkpoint file (https://github.com/UWaterlooIR/golden-gaze/releases/download/model/model.ckpt) in PyTorch Lightning raises the following error:
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
...
File ~/Repositories/master/code/health-retrieval/health_retrieval/modules/stance_detection.py:308, in GoldenGazeStanceDetector._lightning_model(self)
306 @cached_property
307 def _lightning_model(self) -> T5StanceDetector:
--> 308 return T5StanceDetector.load_from_checkpoint(str(self.model))
File ~/.local/share/virtualenvs/health-retrieval-SeINbd51/lib/python3.9/site-packages/pytorch_lightning/core/saving.py:139, in ModelIO.load_from_checkpoint(cls, checkpoint_path, map_location, hparams_file, strict, **kwargs)
137 checkpoint = pl_load(checkpoint_path, map_location=map_location)
138 else:
--> 139 checkpoint = pl_load(checkpoint_path, map_location=lambda storage, loc: storage)
141 if hparams_file is not None:
142 extension = hparams_file.split(".")[-1]
File ~/.local/share/virtualenvs/health-retrieval-SeINbd51/lib/python3.9/site-packages/pytorch_lightning/utilities/cloud_io.py:47, in load(path_or_url, map_location)
45 fs = get_filesystem(path_or_url)
46 with fs.open(path_or_url, "rb") as f:RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
---> 47 return torch.load(f, map_location=map_location)
File ~/.local/share/virtualenvs/health-retrieval-SeINbd51/lib/python3.9/site-packages/torch/serialization.py:705, in load(f, map_location, pickle_module, **pickle_load_args)
700 if _is_zipfile(opened_file):
701 # The zipfile reader is going to advance the current file position.
702 # If we want to actually tail call to torch.jit.load, we need to
703 # reset back to the original position.
704 orig_position = opened_file.tell()
--> 705 with _open_zipfile_reader(opened_file) as opened_zipfile:
706 if _is_torchscript_zip(opened_zipfile):
707 warnings.warn("'torch.load' received a zip file that looks like a TorchScript archive"
708 " dispatching to 'torch.jit.load' (call 'torch.jit.load' directly to"
709 " silence this warning)", UserWarning)
File ~/.local/share/virtualenvs/health-retrieval-SeINbd51/lib/python3.9/site-packages/torch/serialization.py:242, in _open_zipfile_reader.__init__(self, name_or_buffer)
241 def __init__(self, name_or_buffer) -> None:
--> 242 super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
To me it seems like the checkpoint might consist of multiple parts and maybe PyTorchLightning can't load it because some parts are missing. But that's just a wild guess.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.