Open adamjstewart opened 5 months ago
Thanks for the report. I've done this myself many times.
Indeed the caching logic is not very robust right now. When writing to the cache we could write e.g. to .cache/earth2mip/models/pangu/pangu_weather_6.onnx.partial
or similar, and then shutil.move
to the final location. This will make the cache operations atomic, and avoid leaving it in a broken state.
And yes, a progress bar would be helpful too. Pangu is very slow to download.
Version
0.1.0
On which installation method(s) does this occur?
Source
Describe the issue
The download API is a bit finicky. First, when I use
earth2mip.networks.get_model(...)
with a remote model name, it takes a long time to instantiate (presumably because it is downloading a model checkpoint). However, there is no progress bar (tqdm would help here). Because I didn't know what was happening, I Ctrl+C'ed the process and tried again. Every subsequent time, I get the following error:Ideally, this should just redownload the model instead of crashing just because the model hasn't been downloaded. Current workaround is to delete this model directory and try again.
Environment details