Skip to content

Commit 3edf518

Browse files
committed
Don't enter the generator logging ctx twice.
1 parent 9fa8969 commit 3edf518

File tree

1 file changed

+7
-8
lines changed
  • src/imitation/algorithms/adversarial

1 file changed

+7
-8
lines changed

src/imitation/algorithms/adversarial/common.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -499,14 +499,13 @@ def train_gen_with_disc(
499499
if learn_kwargs is None:
500500
learn_kwargs = {}
501501

502-
with self.logger.accumulate_means("gen"):
503-
self.gen_algo.learn(
504-
total_timesteps=total_timesteps,
505-
reset_num_timesteps=False,
506-
callback=self.gen_callback,
507-
**learn_kwargs,
508-
)
509-
self._global_step += 1
502+
self.gen_algo.learn(
503+
total_timesteps=total_timesteps,
504+
reset_num_timesteps=False,
505+
callback=self.gen_callback,
506+
**learn_kwargs,
507+
)
508+
self._global_step += 1
510509

511510
gen_trajs, ep_lens = self.venv_buffering.pop_trajectories()
512511
self._check_fixed_horizon(ep_lens)

0 commit comments

Comments
 (0)