Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jan 30, 2024
1 parent f66c73b commit abe7436
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/mocking_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def _step(self, tensordict):
"terminated": done.clone(),
"observation": n.clone(),
},
batch_size=[], device=self.device,
batch_size=[],
device=self.device,
)

def _reset(self, tensordict: TensorDictBase = None, **kwargs) -> TensorDictBase:
Expand All @@ -241,7 +242,9 @@ def _reset(self, tensordict: TensorDictBase = None, **kwargs) -> TensorDictBase:
done = self.counter >= self.max_val
done = torch.tensor([done], dtype=torch.bool, device=self.device)
return TensorDict(
{"done": done, "terminated": done.clone(), "observation": n}, [], device=self.device,
{"done": done, "terminated": done.clone(), "observation": n},
[],
device=self.device,
)

def rand_step(self, tensordict: Optional[TensorDictBase] = None) -> TensorDictBase:
Expand Down

0 comments on commit abe7436

Please sign in to comment.