Repository navigation
Conversation
…ma_send_wait_request/reply; PLASMA_SUBSCRIBE / UNSUBSCRIBE and PLASMA_DATA / PLASMA_TRANSFER
…hough the functions they are based on are unit tested. Still should add unit testing especially for subscribe to check that it works when the object ID list is empty.
…e the array (since the size of the array is not known by the caller) with unit tests
Collaborator
|
Replaced by #140. |
owenowenisme
added a commit
that referenced
this pull request
Nov 10, 2026
## Description Adds one shared component for per-phase shuffle metrics and exports each phase to Prometheus under its own tag. Today GPU shuffle keeps per-phase `OpRuntimeMetrics` objects but never exposes them, so its dashboard task counts, shuffle progress bar, and output estimate all stay at 0. Shuffle v2 reports correctly but duplicates the estimate and progress-bar code across its map, reduce, and disk variants. `shuffle_phase_metrics.py` adds `ShufflePhaseMetrics` (one phase's counters, block stats, progress bar) and `ShuffleOperatorMetrics` (an operator's phases, answering `get_stats`, `_extra_metrics`, `get_phase_metrics`, the sub-progress bar hooks, and `num_outputs_total` from them). Phase events update the phase's own counters; task events are also replayed on the operator's `self._metrics` under a collision-free key, output events only from the output phase. A lone phase is aliased to the operator's metrics, so single-phase operators keep today's shapes. ## Related issues Related to #61636, which proposed a `ShuffleEngine` abstraction for shuffle v1 and was closed because v1 is being replaced. This PR keeps only the metrics half, as a composed component, for GPU and v2. ## Additional information ```mermaid flowchart LR classDef obj fill:#eef3ff,stroke:#4a6fd6,color:#111 classDef comp fill:#e8f7ec,stroke:#2e8b57,color:#111 classDef surface fill:#f3f3f3,stroke:#888,color:#111 subgraph OP["Any shuffle operator (GPU: two phases · v2: one phase, aliased to the operator counters)"] direction LR som["ShuffleOperatorMetrics (new)<br/>holds the phases; rebuilds the four surfaces from them on request;<br/>keeps the output-total estimate"]:::comp p1["Phase 'shuffle' (ShufflePhaseMetrics, new)<br/>its own counters, block-stats list, progress bar,<br/>shuffle-specific numbers (partitions, bytes shuffled)"]:::comp p2["Phase 'finalize' = the output phase<br/>(ShufflePhaseMetrics, new)<br/>same contents as above"]:::comp base["Operator-level counters (_metrics, from base class)<br/>now complete: tasks of both phases,<br/>real outputs handed downstream"]:::obj som --> p1 som --> p2 p1 -- "forwards task started / finished" --> base p2 -- "forwards task started / finished<br/>and outputs produced / queued" --> base end subgraph SURF["What the user sees"] direction TB prom[("Grafana dashboard (Prometheus gauges)<br/>three series: the operator,<br/>operator/shuffle, operator/finalize")]:::surface stats[["ds.stats() summary table<br/>rows: OperatorNameShuffle,<br/>OperatorNameFinalize"]]:::surface extra[["ds.stats() 'Extra metrics' line<br/>{shuffle: {…}, finalize: {…}}"]]:::surface pm(["Progress manager<br/>one nested bar per phase,<br/>each handed to its phase"]):::surface end base -- "exported as the op's metrics" --> prom som -- "get_phase_metrics(): one extra series per phase" --> prom som -- "get_stats()" --> stats som -- "_extra_metrics()" --> extra som -- "sub-progress bar names / bar objects" --> pm ``` Tests: `test_shuffle_phase_metrics.py` (new, 17 cases) covers the component and drives a minimal `PhysicalOperator` through all four surfaces. AI assistance (Claude Code) was used for drafting this PR (code and description); every changed line was manually reviewed and the tests above run locally. --------- Signed-off-by: Sirui Huang <[email protected]> Signed-off-by: HFFuture <[email protected]> Co-authored-by: You-Cheng Lin <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.