Skip to content

Commit

Permalink
Merge pull request #276 from allenai/petew/sys-metrics
Browse files Browse the repository at this point in the history
log sys metrics less often
  • Loading branch information
dirkgr authored Sep 20, 2023
2 parents 921c254 + a76b3bf commit 2df922b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions olmo/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,10 @@ def split_batch(self, batch: Dict[str, Any]) -> List[Dict[str, Any]]:

def system_metrics(self) -> Dict[str, float]:
metrics = {}
peak_gpu_mb = peak_gpu_memory()
if peak_gpu_mb is not None:
metrics["System/Peak GPU Memory (MB)"] = peak_gpu_mb
if self.global_step < 3 or self.global_step % 10 == 0:
peak_gpu_mb = peak_gpu_memory()
if peak_gpu_mb is not None:
metrics["System/Peak GPU Memory (MB)"] = peak_gpu_mb
return metrics

def log_metrics_to_console(self, prefix: str, metrics: Dict[str, float]):
Expand Down

0 comments on commit 2df922b

Please sign in to comment.