Skip to content

Commit

Permalink
Re-running pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
reginald-mclean committed Aug 3, 2023
1 parent bc6fa0e commit f16371f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metaworld/envs/mujoco/sawyer_xyz/sawyer_xyz_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,10 @@ def step(self, action):
assert len(action) == 4, f"Actions should be size 4, got {len(action)}"
self.set_xyz_action(action[:3])
self.do_simulation([action[-1], -action[-1]], n_frames=self.frame_skip)
if getattr(self, 'curr_path_length', 0) > self.max_path_length:
raise ValueError('Maximum path length allowed by the benchmark has been exceeded')
if getattr(self, "curr_path_length", 0) > self.max_path_length:
raise ValueError(
"Maximum path length allowed by the benchmark has been exceeded"
)
self.curr_path_length += 1

# Running the simulator can sometimes mess up site positions, so
Expand Down

0 comments on commit f16371f

Please sign in to comment.