Using nn.DataParallel(model, device_ids=[0]) results in lost imports

I have a main python file in the same folder as another file I import. If I use the nn.DataParallel function I get an error saying the secondary file cannot be found. To get around this I add the folder to my global path and it seems to work BUT this shouldn’t be needed.

Interestingly when I run it using debug the import statement at the top of main runs fine, so it’s something related to DataParallel.