package numpy support
d4l3k opened this issue · 0 comments
d4l3k commented
If you use package w/ numpy you need to explicitly import numpy ahead of time otherwise it can cause issues since the numpy dependency of torch isn't currently tracked by torch.package.
Work Around
Calling .numpy()
on a torch tensor before using package resolves this issue since torch will import numpy via the usual paths and use it as an extern.
torch.zeros(1).numpy()