Closed manuelhaussmann closed 1 year ago
Hey @manuelhaussmann! Thanks for raising this, and I'm sorry for the slow reply. Been away on holiday and to a conference, and I'm only now catching up on email.
This is a pretty severe bug. I'll put PyTorch 2.0 compatibility high on my list of TODOs.
Hey @manuelhaussmann! I've just looked into this. I believe you might have forgotten to activate the PyTorch extension by importing lab.torch
. I get the following with the latest versions of torch
and LAB:
>>> import lab.torch as B # Note `lab.torch` here, not just `lab`.
>>> import torch
>>> B.create_random_state(torch.float32)
<torch._C.Generator object at 0x7f8f408557b0>
Could you check whether that also works for you?
Yes, it works perfectly. I had indeed just missed lab.torch
. Thanks and sorry for the confusion!
No problem at all! Thanks for the speedy reply. :)
With pytorch 2.0.0 and the latest version of lab,
create_random_state
fails fortorch.float32
andtorch.float64
.gives
NotFoundLookupError: For function `create_random_state`, `(torch.float64,)` could not be resolved.
Numpy data types work without a problem.