Skip to content

Commit 325e37e

Browse files
committed
Fixed max_train_step related comment.
1 parent a8eecf9 commit 325e37e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

QEfficient/finetune/utils/train_utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,13 @@ def train(
165165
total_train_steps += 1
166166

167167
# stop when the maximum number of training steps is reached
168-
if train_config.max_train_step > 0 and total_train_steps > train_config.max_train_step:
168+
if train_config.max_train_step > 0 and total_train_steps >= train_config.max_train_step:
169169
max_steps_reached = True
170+
logger.log_rank_zero(
171+
"Maximum training steps reached "
172+
f"(max_train_step={train_config.max_train_step}). Stopping "
173+
"the training process."
174+
)
170175
break
171176
batch = {k: v.to(device) for k, v in batch.items()} # move the batch elements to qaic device
172177

0 commit comments

Comments
 (0)