Skip to content

Commit

Permalink
move an assert
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 18, 2024
1 parent 3d4084c commit 6cccff4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pi_zero_pytorch/pi_zero.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ def forward_with_reward_cfg(
keep_parallel_frac = 0.,
**kwargs
):
assert self.can_cfg, 'you need to train with reward token dropout'

with_reward_cache, without_reward_cache = cached_state_keys_values

Expand All @@ -686,6 +685,8 @@ def forward_with_reward_cfg(
if not exists(reward_tokens) or cond_scale == 0.:
return action_flow_with_reward, (with_reward_cache_kv, None)

assert self.can_cfg, 'you need to train with reward token dropout'

action_flow_without_reward, without_reward_cache_kv = self.forward(
*args,
cached_state_keys_values = without_reward_cache,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pi-zero-pytorch"
version = "0.0.19"
version = "0.0.20"
description = "π0 in Pytorch"
authors = [
{ name = "Phil Wang", email = "[email protected]" }
Expand Down

0 comments on commit 6cccff4

Please sign in to comment.