File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 14
14
from typing import Optional , Tuple
15
15
16
16
from .extract_source_mappings import parse_single_file
17
- from .shared_vars import DEFAULT_TRACE_FILE_PREFIX as LOG_PREFIX
17
+ from .shared_vars import DEFAULT_TRACE_FILE_PREFIX_WITHOUT_USER as LOG_PREFIX
18
18
from .tp_logger import logger
19
19
20
20
LOG_RANK_REGEX = re .compile (r"rank_(\d+)" )
@@ -285,8 +285,9 @@ def parse_logs(
285
285
path = os .path .join (raw_log_dir , item )
286
286
if not os .path .isfile (path ):
287
287
continue
288
- log_name = f"{ LOG_PREFIX } { rank_config .to_rank ().to_string ('' )} "
289
- if log_name in item :
288
+ log_name = f"{ LOG_PREFIX } .*{ rank_config .to_rank ().to_string ('' )} "
289
+ pattern = re .compile (log_name )
290
+ if pattern .search (item ):
290
291
# Check if the log has a rank in its name
291
292
rank_match = LOG_RANK_REGEX .search (item )
292
293
if rank_match :
Original file line number Diff line number Diff line change 6
6
DEFAULT_TRACE_FILE_PREFIX = (
7
7
f"dedicated_log_triton_trace_{ os .getenv ('USER' , 'unknown' )} _"
8
8
)
9
+ DEFAULT_TRACE_FILE_PREFIX_WITHOUT_USER = "dedicated_log_triton_trace_"
You can’t perform that action at this time.
0 commit comments