From 69ac3d25b2ff62afbdfb2ef3ec28d4524edaf1ba Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Sat, 23 Mar 2024 06:41:13 +0000 Subject: [PATCH] amend --- torchrl/collectors/collectors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchrl/collectors/collectors.py b/torchrl/collectors/collectors.py index 4130828cb27..cfb3ca170e9 100644 --- a/torchrl/collectors/collectors.py +++ b/torchrl/collectors/collectors.py @@ -494,7 +494,7 @@ def __init__( elif torch.backends.mps.is_available(): self._sync_env = torch.mps.synchronize elif self.env_device.type == "cpu": - self._sync_storage = _do_nothing + self._sync_env = _do_nothing else: raise RuntimeError("Non supported device") else: @@ -507,7 +507,7 @@ def __init__( elif torch.backends.mps.is_available(): self._sync_policy = torch.mps.synchronize elif self.policy_device.type == "cpu": - self._sync_storage = _do_nothing + self._sync_policy = _do_nothing else: raise RuntimeError("Non supported device") else: