Skip to content

Commit

Permalink
More consistent trace names. (#1825)
Browse files Browse the repository at this point in the history
Co-authored-by: krammnic <[email protected]>
  • Loading branch information
krammnic and krammnic authored Oct 15, 2024
1 parent f639b6d commit 4bbed4d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion torchtune/training/_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# LICENSE file in the root directory of this source tree.


import datetime
import os
import time
from functools import partial
Expand Down Expand Up @@ -97,8 +98,13 @@ def trace_handler(

# Use tensorboard trace handler rather than directly exporting chrome traces since
# tensorboard doesn't seem to be able to parse traces with prof.export_chrome_trace

now = datetime.datetime.now()

exporter = tensorboard_trace_handler(
curr_trace_dir, worker_name=f"rank{rank}", use_gzip=True
curr_trace_dir,
worker_name=f"r0-{now.year}-{now.month}-{now.day}-{now.hour}-{now.minute}",
use_gzip=True,
)
exporter(prof)

Expand Down

0 comments on commit 4bbed4d

Please sign in to comment.