rollout: fix bugs in checking list lengths, add tests

This commit is contained in:
Levi Burner
2025-01-21 00:34:40 -05:00
parent 699a6765e3
commit cee122116e
3 changed files with 90 additions and 6 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ class Rollout:
if isinstance(model, list) and nroll == 1:
nroll = len(model)
if isinstance(model, list) and len(model) != nroll:
if isinstance(model, list) and len(model) > 1 and len(model) != nroll:
raise ValueError(
f'nroll inferred as {nroll} but model is length {len(model)}'
)