diff --git a/torchrl/_utils.py b/torchrl/_utils.py index 6c52b1d66e7..ae01556f0e6 100644 --- a/torchrl/_utils.py +++ b/torchrl/_utils.py @@ -729,7 +729,7 @@ def _get_state(self): ) else: - self.state = torch.random.get_rng_state() + self._state = torch.random.get_rng_state() def __exit__(self, exc_type, exc_val, exc_tb): if self.has_cuda: