Skip to content

Commit

Permalink
fixed uneccessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wmcclinton committed Nov 2, 2023
1 parent 8a2a071 commit 943c4f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion predicators/planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,6 @@ def _run_plan_with_option_model(
lambda s, m, o, p: True).ground(option.objects, option.params)
action_option.memory = option.memory
actions[idx].set_option(action_option)
time.sleep(2)
# Since we're not checking the expected_atoms, we need to
# explicitly check if the goal is achieved.
if task.goal_holds(traj[-1]):
Expand Down
7 changes: 2 additions & 5 deletions predicators/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2542,10 +2542,7 @@ class VideoMonitor(Monitor):

def observe(self, state: State, action: Optional[Action]) -> None:
del state # unused
render_state = self._render_fn(action, None)
self._video.extend(render_state)
self._video.extend(render_state)
self._video.extend(render_state)
self._video.extend(self._render_fn(action, None))

def get_video(self) -> Video:
"""Return the video."""
Expand Down Expand Up @@ -2622,7 +2619,7 @@ def save_video(outfile: str, video: Video) -> None:
"""Save the video to video_dir/outfile."""
outdir = CFG.video_dir
os.makedirs(outdir, exist_ok=True)
outpath = os.path.join(outdir, str(CFG.seed) + "_" + outfile)
outpath = os.path.join(outdir, outfile)
imageio.mimwrite(outpath, video, fps=CFG.video_fps) # type: ignore
logging.info(f"Wrote out to {outpath}")

Expand Down

0 comments on commit 943c4f4

Please sign in to comment.