Skip to content

Commit d32d4fc

Browse files
yurekamiclaude
andcommitted
Fix progress_printer using wrong variable in on_test_batch_end (#15064)
The on_test_batch_end() method was incorrectly referencing self.total_validation_steps instead of self.total_test_steps, causing an AttributeError when running trainer.test() since total_validation_steps may not be initialized during testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 459a177 commit d32d4fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nemo/lightning/pytorch/callbacks/progress_printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def on_test_batch_end(
218218
return
219219
n = int((batch_idx + 1) / get_num_microbatches())
220220
if self.should_log(n):
221-
print(self.test_description + f": iteration {n}/{self.total_validation_steps}")
221+
print(self.test_description + f": iteration {n}/{self.total_test_steps}")
222222

223223
def should_log(self, n):
224224
return n % self.log_interval == 0

0 commit comments

Comments
 (0)