File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -550,4 +550,3 @@ The features are available before an official release so that users and collabor
550
550
551
551
# License
552
552
TorchRL is licensed under the MIT License. See [LICENSE ](LICENSE ) for details.
553
-
Original file line number Diff line number Diff line change 22
22
from tensordict .tensordict import TensorDict , TensorDictBase
23
23
from torch import multiprocessing as mp
24
24
from torch .utils .data import IterableDataset
25
+
25
26
from torchrl ._utils import _check_for_faulty_process , prod
26
27
from torchrl .collectors .utils import split_trajectories
27
28
from torchrl .data import TensorSpec
@@ -655,7 +656,7 @@ def rollout(self) -> TensorDictBase:
655
656
self ._tensordict = self .env .step (self ._tensordict )
656
657
657
658
step_count = self ._tensordict .get ("step_count" )
658
- step_count += 1
659
+ self . _tensordict . set_ ( " step_count" , step_count + 1 )
659
660
# we must clone all the values, since the step / traj_id updates are done in-place
660
661
try :
661
662
self ._tensordict_out [..., j ] = self ._tensordict
You can’t perform that action at this time.
0 commit comments