Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More consistent trace names. #1825

Merged
merged 3 commits into from
Oct 15, 2024
Merged
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
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
Loading