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
7 changes: 6 additions & 1 deletion tunix/sft/peft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def train(
if self.config.max_steps is not None and self._pbar is None:
self._pbar = progress_bar.ProgressBar(
metrics_logger=self.metrics_logger,
initial_steps=self._train_steps,
initial_steps=self.global_steps,
max_steps=self.config.max_steps,
description=self.config.pbar_description,
)
Expand Down Expand Up @@ -713,6 +713,11 @@ def train_steps(self) -> int:
"""Returns the number of train steps taken."""
return self._train_steps

@property
def global_steps(self) -> int:
"""Returns the number of global steps taken (same as train_steps for compatibility)."""
return self._train_steps

@property
def iter_steps(self) -> int:
"""Returns the number of iterator steps taken."""
Expand Down