mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-27 17:23:08 +00:00
fix duplicate code + add safety checks
This commit is contained in:
parent
7da681ec46
commit
6b92ee16ec
3 changed files with 4 additions and 6 deletions
|
|
@ -552,7 +552,10 @@ class MathEnv(BaseEnv):
|
|||
i
|
||||
for i, score in enumerate(to_postprocess["scores"])
|
||||
if score == 1.0
|
||||
][0]
|
||||
]
|
||||
if len(pos_idx) == 0:
|
||||
return None, to_backlog
|
||||
pos_idx = pos_idx[0]
|
||||
neg_idx = [
|
||||
i
|
||||
for i, score in enumerate(to_postprocess["scores"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue