Thank you, Fred, for finding how to work around it. This is good, but it will just mask the problem.
And after many experiments on CI, I finally tracked it down.
It’s the pypi build for torch/torchvision that causes the segfault. conda build of the same works just fine. Seems to happen only on osx.
So rather than trying to fix the fastai code - we need to come up with a reproducable test case that we can give to pytorch developers so that they could fix it.
@313V, do you think you could do it? taking that test as it is while it segfaults and replacing it with a pure pytorch code that still segfaults?
I also asked here, if perhaps that segfault/trace was sufficient for them to know where the problem is in pytorch.