Closed michele-milesi closed 4 months ago
With torch 2.0 it is not possible to call the torch.no_grad() in this way. This throws an error when trying to evaluate the agent with disable_grads=True. (https://pytorch.org/docs/2.0/generated/torch.no_grad.html?highlight=no_grad#torch.no_grad).
torch.no_grad()
disable_grads=True
https://github.com/Eclectic-Sheep/sheeprl/blob/0639e16e68f0f56391a19f62485a5e4f78014fd5/sheeprl/cli.py#L226
This is allowed from torch 2.1 onwards (https://pytorch.org/docs/2.1/generated/torch.no_grad.html#no-grad).
cc: @belerico
With torch 2.0 it is not possible to call the
torch.no_grad()
in this way. This throws an error when trying to evaluate the agent withdisable_grads=True
. (https://pytorch.org/docs/2.0/generated/torch.no_grad.html?highlight=no_grad#torch.no_grad).https://github.com/Eclectic-Sheep/sheeprl/blob/0639e16e68f0f56391a19f62485a5e4f78014fd5/sheeprl/cli.py#L226
This is allowed from torch 2.1 onwards (https://pytorch.org/docs/2.1/generated/torch.no_grad.html#no-grad).
cc: @belerico