Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add GPU metrics to workflow-level execution summary#7229

Merged
bentsherman merged 3 commits into
masterfrom
fix/gpu-workflow-summary-metrics
Jun 16, 2026
Merged

Add GPU metrics to workflow-level execution summary#7229
bentsherman merged 3 commits into
masterfrom
fix/gpu-workflow-summary-metrics

Conversation

@cristianrcv

Copy link
Copy Markdown
Contributor

Problem

#7022 added Fusion GPU metrics collection: the gpu block from .fusion/trace.json is parsed on task completion, carried as a transient gpuMetrics field on TraceRecord, 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 ResourcesAggregatorReportSummary, 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 transient gpuMetrics map attached by #7022 (snake_case keys as emitted by Fusion):

Series Fusion trace key Semantics
gpuUsage pct GPU compute utilisation (%)
gpuMemPeak peak_mem_used peak GPU memory used (MiB)
gpuMemAvg avg_mem average GPU memory used (MiB)

The series names match the fields expected by Seqera Platform's WorkflowMetrics model, so no platform change is required — the new series flow automatically through ResourcesAggregator.computeSummaryList() into the workflow completion request.

Behaviour notes

  • Tasks without GPU data return null from the mappers and are skipped, same as the existing memUsage/timeUsage series when requests are missing.
  • Runs with no GPU tasks produce no GPU series at all (Summary.compute() returns null on empty series), so existing behaviour is unchanged for non-GPU workloads.
  • The HTML execution report is unaffected: ReportTemplate.js reads 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-tower TowerObserverTest all pass.

🤖 Generated with Claude Code

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]>
@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 70e3079
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6a31231f13f7b40008a16eee

@cristianrcv cristianrcv requested a review from jorgee June 12, 2026 17:01
@bentsherman bentsherman merged commit 43da3f1 into master Jun 16, 2026
42 of 43 checks passed
@bentsherman bentsherman deleted the fix/gpu-workflow-summary-metrics branch June 16, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants