Skip to content

Commit

Permalink
Update Chakra not to be terminated by error in HTA
Browse files Browse the repository at this point in the history
  • Loading branch information
JoongunPark committed Nov 16, 2024
1 parent b079633 commit cf42d25
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/trace_link/trace_linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,18 @@ 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"]
for edge in cp_graph.critical_path_edges_set:
Expand Down

0 comments on commit cf42d25

Please sign in to comment.