fix: `ObservationBuffer.get_obs_vec()` sorting logic

This commit is contained in:
fan-ziqi 2024-12-13 15:25:43 +08:00
parent 123094bfb3
commit 0e5506ed67
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class ObservationBuffer:
"""
obs = []
for obs_id in reversed(sorted(obs_ids)):
for obs_id in reversed(obs_ids):
slice_idx = self.include_history_steps - obs_id - 1
obs.append(self.obs_buf[:, slice_idx * self.num_obs : (slice_idx + 1) * self.num_obs])
return torch.cat(obs, dim=-1)