Skip to content

Commit 2207ffd

Browse files
committed
Lora check with _log_peak_memory_stats
1 parent a283ef3 commit 2207ffd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

recipes/lora_finetune_single_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def _setup_model(
481481

482482
log.info(f"Model is initialized with precision {self._dtype}.")
483483

484-
if self._device.type != "cpu":
484+
if self._device.type != "cpu" and self._log_peak_memory_stats:
485485
memory_stats = training.get_memory_stats(device=self._device)
486486
training.log_memory_stats(memory_stats)
487487
return model

0 commit comments

Comments
 (0)