We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8eecf9 commit 325e37eCopy full SHA for 325e37e
QEfficient/finetune/utils/train_utils.py
@@ -165,8 +165,13 @@ def train(
165
total_train_steps += 1
166
167
# 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:
+ if train_config.max_train_step > 0 and total_train_steps >= train_config.max_train_step:
169
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
+ )
175
break
176
batch = {k: v.to(device) for k, v in batch.items()} # move the batch elements to qaic device
177
0 commit comments