Skip to content

Commit

Permalink
Handling HTA Errors in Chakra
Browse files Browse the repository at this point in the history
  • Loading branch information
JoongunPark committed Nov 16, 2024
1 parent 474b99f commit 09c0050
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/trace_link/trace_linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,17 @@ def load_sync_dependencies(
absolute_kineto_file = os.path.abspath(kineto_file)
trace_dir = os.path.dirname(absolute_kineto_file)
trace_analysis = TraceAnalysis(trace_dir=trace_dir)
cp_graph, success = trace_analysis.critical_path_analysis(
rank=rank, annotation=annotation, instance_id=instance_id
)
if not success:
logging.error("Failed to load Critical Path Graph")
try:
cp_graph, success = trace_analysis.critical_path_analysis(
rank=rank, annotation=annotation, instance_id=instance_id
)
if not success:
logging.error("Critical path analysis completed but failed to load Critical Path Graph.")
return sync_dependencies

except ValueError as e:
logging.error("Critical path analysis encountered an invalid graph structure: %s", e)
# Optionally, you could log more details or include rank-specific information if relevant
return sync_dependencies

raw_events = trace_analysis.t.get_raw_trace_for_one_rank(rank=rank)["traceEvents"]
Expand Down

0 comments on commit 09c0050

Please sign in to comment.