Skip to content

Commit

Permalink
Fix: obs spaces for single gpu env
Browse files Browse the repository at this point in the history
  • Loading branch information
arth-shukla committed Mar 2, 2024
1 parent 98bab6b commit e8743d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mani_skill2/envs/sapien_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ def _update_obs_space(self, obs: Any):

@cached_property
def single_observation_space(self):
if self.num_envs > 1:
if physx.is_gpu_enabled():
return convert_observation_to_space(self._init_raw_obs, unbatched=True)
else:
return convert_observation_to_space(self._init_raw_obs)

@cached_property
def observation_space(self):
if self.num_envs > 1:
if physx.is_gpu_enabled():
return batch_space(self.single_observation_space, n=self.num_envs)
else:
return self.single_observation_space
Expand Down

0 comments on commit e8743d8

Please sign in to comment.