Add GPU metrics to workflow-level execution summary#7229
Merged
Conversation
The Fusion GPU metrics introduced in #7022 are attached per-task to the trace record but were never included in the per-process summary stats computed by ResourcesAggregator/ReportSummary. As a result, Seqera Platform receives per-task GPU data but no workflow-level gpuUsage/gpuMemPeak/gpuMemAvg series in the completion request, so the run-level Metrics tab never shows GPU plots. Add three GPU series mappers to ReportSummary reading the transient gpuMetrics map: pct -> gpuUsage (%), peak_mem_used -> gpuMemPeak (MiB), avg_mem -> gpuMemAvg (MiB). Series names match the WorkflowMetrics fields expected by Seqera Platform. Tasks without GPU data are skipped; runs with no GPU tasks produce no GPU series, preserving existing behaviour. Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Cristian Ramon-Cortes <[email protected]>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Signed-off-by: munishchouhan <[email protected]>
jorgee
approved these changes
Jun 16, 2026
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.
Problem
#7022 added Fusion GPU metrics collection: the
gpublock from.fusion/trace.jsonis parsed on task completion, carried as a transientgpuMetricsfield onTraceRecord, and included in the per-task payload sent to Seqera Platform. This works — per-task GPU metrics show correctly in the task details view.However, the workflow-level metrics summary never includes GPU data. The per-process box-and-whisker stats sent at workflow completion are computed by
ResourcesAggregator→ReportSummary, whose mapper table contains only nine series (cpu,mem,vmem,time,reads,writes,cpuUsage,memUsage,timeUsage). GPU was never added there.The visible effect in Seqera Platform: a GPU run shows GPU metrics in Task details → Metrics, but the run-level Metrics tab shows only CPU/memory plots. The platform already has the schema, API, and frontend charts for the workflow-level GPU series (
gpuUsage,gpuMemPeak,gpuMemAvg) — the data just never arrives.Change
Add three GPU series mappers to
ReportSummary, reading the transientgpuMetricsmap attached by #7022 (snake_case keys as emitted by Fusion):gpuUsagepctgpuMemPeakpeak_mem_usedgpuMemAvgavg_memThe series names match the fields expected by Seqera Platform's
WorkflowMetricsmodel, so no platform change is required — the new series flow automatically throughResourcesAggregator.computeSummaryList()into the workflow completion request.Behaviour notes
nullfrom the mappers and are skipped, same as the existingmemUsage/timeUsageseries when requests are missing.Summary.compute()returnsnullon empty series), so existing behaviour is unchanged for non-GPU workloads.ReportTemplate.jsreads specific named keys from the summary JSON and ignores unknown ones.Tests
should get gpu summary stats— quartiles/mean/labels computed across GPU tasks, with a CPU-only task correctly excluded from the GPU series.should return null gpu summary when no task reports gpu metrics— no GPU series for non-GPU runs.Verified locally:
ReportSummaryTest,ResourcesAggregatorTest,ReportObserverTest, and nf-towerTowerObserverTestall pass.🤖 Generated with Claude Code