Solution to: warnings.warn(f"Unable to retrieve source for @torch.jit._overload function: {func}.")
This is just an warning and not an error at all. If by any reason you keep getting this warning and you don’t want it (like I needed to log the project in the exe file for the customer and this messages were annoying) you can just fix by removing the warning message. Here is the original code:
https://github.com/pytorch/pytorch/blob/master/torch/_jit_internal.py 2
save this as “_jit_internal.py” under lib/torch. Go at line 750 and remove the warning:

image1009×210 12.3 KB

Recompile the file (.pyc):
python -m compileall _jit_internal.py

and your problem should finally be gone.