Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,7 @@ def __init__(self):
self.ckpt_time = 0.0

def on_train_start(self, trainer, pl_module):
# Initialize timer at training start to avoid AttributeError when resuming mid-epoch
# (where on_train_epoch_start is skipped).
self.start_time = time.perf_counter()
self.ckpt_time = 0.0

def on_train_epoch_start(self, trainer, pl_module):
# Start timer at the beginning of the epoch to capture the first batch's data loading time
# Start timer at the beginning of the training to capture the first batch's data loading time
self.start_time = time.perf_counter()
self.ckpt_time = 0.0
Comment thread
yuxin00j marked this conversation as resolved.

Expand Down
Loading