I’ve manually cloned the fastai project and tried to run fastai/vision/gan.py manually(just to see if the …torch_core import *) would throw and error and got the error ValueError: attempted relative import beyond top-level package because of from ..torch_core import *
in that file.
Why does that throw an error? As far as I am concerned, that is valid python code that uses relative import. If this breaks, then how come when not using it directly from source, this works? For example, if I wrote a python file in a directory that uses the pip installed fastai, and run from fastai.vision.gan import *
in that file, then everything is loaded and fine even though I suspect the from fastai.vision.gan import*
would fail because it’ll try to import from ..torch_core import *
as well?