Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGleave committed Oct 7, 2023
1 parent 5bca968 commit 407b7dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/imitation/scripts/eval_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def eval_policy(
sample_until = rollout.make_sample_until(eval_n_timesteps, eval_n_episodes)
post_wrappers = [video_wrapper_factory(log_dir, **video_kwargs)] if videos else None
with environment.make_venv( # type: ignore[wrong-keyword-args]
post_wrappers=post_wrappers
post_wrappers=post_wrappers,
) as venv:
if render:
venv = InteractiveRender(venv, render_fps)
Expand Down
4 changes: 2 additions & 2 deletions src/imitation/scripts/ingredients/demonstrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ def _generate_expert_trajs(
raise ValueError("n_expert_demos must be specified when generating demos.")

logger.info(f"Generating {n_expert_demos} expert trajectories")
with environment.make_rollout_venv() as rollout_env: # type: ignore[wrong-arg-count]
with environment.make_rollout_venv() as env: # type: ignore[wrong-arg-count]
return rollout.rollout(
expert.get_expert_policy(rollout_env),
expert.get_expert_policy(env),
rollout_env,
rollout.make_sample_until(min_episodes=n_expert_demos),
rng=_rnd,
Expand Down
2 changes: 1 addition & 1 deletion src/imitation/scripts/train_rl.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def train_rl(

post_wrappers = [lambda env, idx: wrappers.RolloutInfoWrapper(env)]
with environment.make_venv( # type: ignore[wrong-keyword-args]
post_wrappers=post_wrappers
post_wrappers=post_wrappers,
) as venv:
callback_objs = []
if reward_type is not None:
Expand Down

0 comments on commit 407b7dd

Please sign in to comment.