Skip to content

Commit 5cda5eb

Browse files
andytwiggGoogle-ML-Automation
authored andcommitted
allow setting num_test_batches=0 to skip pre/post RL evaluation
PiperOrigin-RevId: 888238813
1 parent 3e7e1b8 commit 5cda5eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/maxtext/trainers/post_train/rl/evaluate_rl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ def evaluate(
245245
to_return = (
246246
corr,
247247
total,
248-
corr / total * 100,
249-
partially_corr / total * 100,
250-
corr_format / total * 100,
248+
corr / total * 100 if total > 0 else 0,
249+
partially_corr / total * 100 if total > 0 else 0,
250+
corr_format / total * 100 if total > 0 else 0,
251251
)
252252

253253
return to_return, response_lst

0 commit comments

Comments
 (0)