Skip to content

feat(aorta): collect per-node traces, survive partial node failure - #331

Open
speriaswamy-amd wants to merge 1 commit into
surya/aorta-mn-05-timeoutsfrom
surya/aorta-mn-06-traces
Open

feat(aorta): collect per-node traces, survive partial node failure#331
speriaswamy-amd wants to merge 1 commit into
surya/aorta-mn-05-timeoutsfrom
surya/aorta-mn-06-traces

Conversation

@speriaswamy-amd

Copy link
Copy Markdown
Contributor

Stack 6/6 — splits #171. Base: #330. Final PR; the tip of this stack is identical to #171's tree.

Why

Two problems with profiler artifacts on a multi-node run.

  1. Each node wrote its torch_profiler/ tree to its own filesystem, so the host parser only ever saw the head node's ranks.
  2. run() returned as soon as any node failed, before collecting anything. One flaky node in a multi-hour run discarded every surviving node's traces, forcing a full rerun or a manual TraceLensParser salvage.

What changed

  • _collect_multi_node_traces() — consolidates every node's trees into <aorta_path>/combined_traces/node_<rank>/: local copy when the orchestrator shares the head's filesystem, rsync over SSH otherwise, scp -r where rsync is absent. Per-node failures are logged and skipped rather than aborting the collection.
  • Trace discovery skips anything under combined_traces/ so the stale per-node originals cannot shadow the consolidated set, and seeds trace_mtime from the collected tree — without that seed the existing freshest-trace comparison raises UnboundLocalError once trace_dir can be pre-set.
  • Collection and artifact discovery now run unconditionally. The run is still reported FAILED/TIMEOUT with the offending nodes named in error_message, but artifacts come from whatever the survivors produced.

Test

ruff clean. Unit tests 631 → 638 (7 new: combined_traces path predicate, local copy-tree with recursion guard, collection layout, and partial-failure-still-collects).

Live validation from #171 still applies unchanged — this stack's tip is byte-identical to that branch for every non-test file: cvs run test_aorta on a real 2-node cluster (g17u19 + f16u13, 16×MI300X), 5/5 pytest cases in 148s, traces from both nodes, host parser produced metrics for all 16 ranks.

Two problems with profiler artifacts on a multi-node run.

First, each node wrote its torch_profiler/ tree to its own filesystem, so the
host parser only ever saw the head node's ranks. _collect_multi_node_traces()
consolidates every node's trees into <aorta_path>/combined_traces/node_<rank>/:
a local copy when the orchestrator shares the head's filesystem, rsync over SSH
otherwise, scp -r where rsync is absent. Per-node failures are logged and skipped
rather than aborting the collection. The trace-discovery scan skips anything under
combined_traces/ so the stale per-node originals cannot shadow the consolidated
set, and seeds trace_mtime from the collected tree - without that seed the
existing freshest-trace comparison raises UnboundLocalError once trace_dir can be
pre-set.

Second, run() returned as soon as any node failed, before collecting anything.
One flaky node in a multi-hour run therefore discarded every surviving node's
traces, forcing a full rerun or a manual TraceLensParser salvage. Collection and
artifact discovery now run unconditionally; the run is still reported FAILED or
TIMEOUT with the offending nodes named in error_message, but artifacts come from
whatever the survivors produced.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant