Skip to content

Commit

Permalink
Update record.py
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneT2000 committed Mar 6, 2024
1 parent faf62dc commit 16e5a07
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mani_skill2/utils/wrappers/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,6 @@ def reset(
else:
self.flush_trajectory(env_idxs_to_flush=to_numpy(options["env_idx"]))

self.last_reset_kwargs = copy.deepcopy(
dict(seed=seed, options=options, **kwargs)
)
obs, info = super().reset(*args, seed=seed, options=options, **kwargs)

if self.save_trajectory:
Expand Down Expand Up @@ -365,7 +362,11 @@ def recursive_replace(x, y):
)
if self._trajectory_buffer.fail is not None:
recursive_replace(self._trajectory_buffer.fail, first_step.fail)

if "env_idx" in options:
options["env_idx"] = to_numpy(options["env_idx"])
self.last_reset_kwargs = copy.deepcopy(
dict(seed=seed, options=options, **kwargs)
)
return obs, info

def step(self, action):
Expand Down

0 comments on commit 16e5a07

Please sign in to comment.