Closed josephdviviano closed 6 months ago
Essentially, with this change, we would get the usual pytorch error of incompatible devices instead, right?
Yea exactly, it’s up to the user to ensure everything is on the correct device explicitly
Joseph (Mobile)
On Sun, Feb 18, 2024 at 08:39 saleml @.***> wrote:
Essentially, with this change, we would get the usual pytorch error of incompatible devices instead, right?
— Reply to this email directly, view it on GitHub https://github.com/GFNOrg/torchgfn/pull/159#issuecomment-1951329001, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7TL2VHYP2QORKP4PNTWD3YUIAANAVCNFSM6AAAAABDM55KACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGMZDSMBQGE . You are receiving this because you authored the thread.Message ID: @.***>
Removes a "feature" whereby the
NeuralNet
would automatically cast tensors to a particular device. This would have the strange side effect of moving a part of thegflownet
instance to an unexpected device, causing a bug that is confusing to track down.Instead, the code will now fail in a sensible way if the user does not cast tensors to the correct device, making debugging easy.
This might require slightly more thought in the case where one has multiple environments running on difference devices, but we can address this in a follow up PR.