[Resolved] Fastai Bug: learn.save() stores model in tmp, while learn.load() looks for it in data

I’m investigating a little more…

Edit:
I think I know where the problem is coming from, though I’m yet to fully trace the source of the error. When we do

data = data.resize(int(sz*1.3), 'tmp')

I think the directory referred to by learn.get_model_path(f'{sz}_planet_snapshot') changes to data/planet/tmp/83/models in my case, instead of data/planet/models. The number ‘83’ might be different, in the case of anyone who tries. So if you did ‘learn.save()’ after resizing, learn.load() will still look for the model in data/planet/model, which fails. I’ll try and confirm this hypothesis.

3 Likes

That’s exactly right. When you resize, it uses the new directory with the resized images as the path from then on.

1 Like

Thanks for confirming this.

Hi, what is the status on this? I’m getting some weird behavior when I use load after restarting paperspace.