Skip to content

Commit

Permalink
fix(nyz): fix zergling collector unittest bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PaParaZz1 committed Mar 29, 2023
1 parent afcfa51 commit e873d9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ding/worker/collector/zergling_parallel_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def policy(self, _policy: Policy) -> None:
self._policy = _policy
self._policy_cfg = self._policy.get_attribute('cfg')
self._n_sample = _policy.get_attribute('n_sample')
self._n_episode = _policy.get_attribute('n_sample')
assert any(
self._n_episode = _policy.get_attribute('n_episode')
assert not all(
[t is None for t in [self._n_sample, self._n_episode]]
), "n_episode/n_sample in policy cfg can't be not None at the same time"
# TODO(nyz) the same definition of traj_len in serial and parallel
Expand Down

0 comments on commit e873d9e

Please sign in to comment.