Skip to content

[Reporting] SOL for NCCL/NIXL in comparison report - #991

Merged
podkidyshev merged 9 commits into
mainfrom
ipod/sol-1
Aug 11, 2026
Merged

[Reporting] SOL for NCCL/NIXL in comparison report#991
podkidyshev merged 9 commits into
mainfrom
ipod/sol-1

Conversation

@podkidyshev

@podkidyshev podkidyshev commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Flexible SOL configuration + using it in comparison reports for NCCL and NIXL

Test Plan

  • Automated CI
  • Manual runs

Additional Notes

Trade-off

The complexity of comparison reporters has grown significantly. I attempted many solutions that both produce clear code and stay under the sane limit of code changes. Unfortunately, we need a complete rebuild of data structures.

I'll create an internal ticket for this once we pass this PR. The PR change is a P1 requirement for another team thus it cannot take forever to iterate on it...

Example: NIXL

image image

Example: NCCL

image image

@podkidyshev podkidyshev self-assigned this Aug 6, 2026
@podkidyshev podkidyshev added the feature new functionality label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

CloudAI adds typed SOL target configuration, precedence handling, NCCL and NIXL metric extraction, shared SOL comparison reporting, responsive chart updates, documentation, and integration tests.

Changes

SOL metric reporting

Layer / File(s) Summary
Metric contracts and configuration
src/cloudai/metrics.py, src/cloudai/_core/system.py, src/cloudai/_core/test_scenario.py, src/cloudai/models/scenario.py
Adds typed metric catalogs, SOL targets, validation, assessment, formatting, and system and scenario configuration fields.
Configuration propagation and observation hook
src/cloudai/test_scenario_parser.py, src/cloudai/models/workload.py
Merges system-, scenario-, and test-level SOL configurations and adds the default metric observation hook.
NCCL and NIXL metric extraction
src/cloudai/workloads/nccl_test/nccl.py, src/cloudai/workloads/nixl_bench/nixl_bench.py
Extracts normalized latency and bandwidth observations from NCCL and NIXL benchmark results.
Metric comparison report pipeline
src/cloudai/report_generator/comparison_report.py, src/cloudai/report_generator/comparison_report_metric.py, src/cloudai/workloads/nccl_test/nccl_comparison_report.py, src/cloudai/workloads/nixl_bench/nixl_summary_report.py
Adds shared metric section construction and renders measured values, SOL values, attainment, charts, and tables for NCCL and NIXL reports.
Report presentation and validation
src/cloudai/util/comparison-report-v2.jinja2, doc/reporting.rst, tests/test_metrics.py, tests/workloads/nixl_bench/test_report.py
Updates comparison v2 layout and chart behavior, documents SOL configuration, and tests parsing, merging, and rendered report output.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: rutayan-nv, srivatsankrishnan

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding SOL support for NCCL and NIXL comparison reports.
Description check ✅ Passed The description directly explains flexible SOL configuration and its use in NCCL and NIXL comparison reports.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ipod/sol-1

Comment @coderabbitai help to get the list of available commands.

@podkidyshev podkidyshev changed the title Add SOL metrics and comparison reporting [Reporting] SOL for NCCL/NIXL in comparison report Aug 7, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/cloudai/metrics.py`:
- Around line 210-217: Update the attainment property to handle a zero
self.observation.value before the MINIMIZE division, returning an appropriate
non-error result consistent with the metric’s attainment semantics. Preserve the
existing target-none and MAXIMIZE behavior, and ensure zero-valued observations
cannot raise ZeroDivisionError during report generation.

In `@src/cloudai/report_generator/comparison_report_metric.py`:
- Around line 117-127: Update the result-column assignments in the comparison
report metric generation flow to use the shared SOL and attainment column-name
helpers from ComparisonReport instead of interpolating “ SOL” and “ % SOL”
directly. Reuse the same helpers for both writing columns and preserve the
existing mapping behavior.
- Around line 121-124: Update NIXLBenchComparisonReport’s comparison-series
construction to preserve batch_size, either by including batch_size in
series_dimensions or by explicitly aggregating rows so distinct batch sizes are
not collapsed by the groupby(...).first() call in the series filtering flow.

In `@src/cloudai/report_generator/comparison_report.py`:
- Around line 729-733: Update the measured_max and measured_min reductions in
_build_curve_section to use NaN-aware pandas/NumPy aggregation, then exclude any
NaN results before computing y_max and y_min. Preserve the existing sol_values
inclusion and ensure Range1d receives finite measured bounds when data columns
are entirely NaN.
- Around line 465-482: Update the SOL data construction around _shared_sol_curve
to use _numeric_value for x values and skip non-numeric points consistently with
the measured branch. Replace the datasets.insert call with datasets.append, then
remove the now-unused metric_idx and inserted counter by dropping enumerate and
related increments.

In `@src/cloudai/workloads/nccl_test/nccl.py`:
- Around line 197-228: Update metric_observations to validate all required
numeric fields in each row before converting them or creating MetricObservation
objects. Skip rows containing non-numeric values such as N/A, while preserving
existing handling for valid values and allowing -nan to follow current float
conversion behavior.

In `@src/cloudai/workloads/nixl_bench/nixl_bench.py`:
- Around line 70-77: Update the dimensions construction to access the typed
NIXLBenchCmdArgs fields directly for op_type, backend, initiator_seg_type, and
target_seg_type instead of using getattr defaults. Preserve the lowercase string
conversion, and handle any optional None values explicitly rather than
converting them to "none"; keep size_bytes and batch_size unchanged.

In `@tests/workloads/nixl_bench/test_report.py`:
- Around line 97-105: Extend the report tests around the existing legacy_html
and html assertions to cover two compared runs with different SOL values,
exercising the _shared_sol_curve None path, and verify the latency section omits
SOL and % SOL columns when no SOL target exists. Replace the broad legacy_html
SOL substring check with an assertion for the rendered SOL column header.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 5637b817-d2e1-4bf9-8627-b947a375bfc3

📥 Commits

Reviewing files that changed from the base of the PR and between 5b5c0f7 and 7b4bda4.

📒 Files selected for processing (15)
  • doc/reporting.rst
  • src/cloudai/_core/system.py
  • src/cloudai/_core/test_scenario.py
  • src/cloudai/metrics.py
  • src/cloudai/models/scenario.py
  • src/cloudai/models/workload.py
  • src/cloudai/report_generator/comparison_report.py
  • src/cloudai/report_generator/comparison_report_metric.py
  • src/cloudai/test_scenario_parser.py
  • src/cloudai/util/comparison-report-v2.jinja2
  • src/cloudai/workloads/nccl_test/nccl.py
  • src/cloudai/workloads/nccl_test/nccl_comparison_report.py
  • src/cloudai/workloads/nixl_bench/nixl_bench.py
  • src/cloudai/workloads/nixl_bench/nixl_summary_report.py
  • tests/workloads/nixl_bench/test_report.py

Comment thread src/cloudai/metrics.py
Comment thread src/cloudai/report_generator/comparison_report_metric.py
Comment thread src/cloudai/report_generator/comparison_report_metric.py
Comment thread src/cloudai/report_generator/comparison_report.py Outdated
Comment thread src/cloudai/report_generator/comparison_report.py Outdated
Comment thread src/cloudai/workloads/nccl_test/nccl.py
Comment thread src/cloudai/workloads/nixl_bench/nixl_bench.py
Comment thread tests/workloads/nixl_bench/test_report.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/cloudai/workloads/nccl_test/nccl.py (1)

204-211: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Reject non-finite benchmark values before creating observations.

float("nan") and infinity pass numeric conversion, but MetricObservation rejects non-finite values. One invalid result row then aborts report generation instead of being skipped.

  • src/cloudai/workloads/nccl_test/nccl.py#L204-L211: Check converted latency and bandwidth values with math.isfinite before appending observations.
  • src/cloudai/workloads/nixl_bench/nixl_bench.py#L71-L88: Catch conversion failures and skip rows with non-finite latency or bandwidth before constructing observations.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cloudai/workloads/nccl_test/nccl.py` around lines 204 - 211, In
src/cloudai/workloads/nccl_test/nccl.py lines 204-211, update the row parsing in
the NCCL observation flow to skip rows when any converted latency or bandwidth
value is non-finite, using math.isfinite before appending observations. In
src/cloudai/workloads/nixl_bench/nixl_bench.py lines 71-88, catch numeric
conversion failures and skip rows whose converted latency or bandwidth values
are non-finite before constructing MetricObservation instances.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/cloudai/report_generator/comparison_report.py`:
- Around line 384-395: The _sol_curve method currently collapses conflicting SOL
targets with drop_duplicates(x_column), producing an arbitrary shared curve.
Update it to render separate SOL datasets, or return no shared curve unless all
valid SOL values agree for each x value; preserve the existing curve only when
candidates are consistent, and add coverage for differing batch-size or
placement SOL targets.

---

Duplicate comments:
In `@src/cloudai/workloads/nccl_test/nccl.py`:
- Around line 204-211: In src/cloudai/workloads/nccl_test/nccl.py lines 204-211,
update the row parsing in the NCCL observation flow to skip rows when any
converted latency or bandwidth value is non-finite, using math.isfinite before
appending observations. In src/cloudai/workloads/nixl_bench/nixl_bench.py lines
71-88, catch numeric conversion failures and skip rows whose converted latency
or bandwidth values are non-finite before constructing MetricObservation
instances.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 330d0ce9-7ad8-4fda-bd82-a05c76a37ea5

📥 Commits

Reviewing files that changed from the base of the PR and between 7b4bda4 and 013ebc6.

📒 Files selected for processing (7)
  • src/cloudai/metrics.py
  • src/cloudai/report_generator/comparison_report.py
  • src/cloudai/report_generator/comparison_report_metric.py
  • src/cloudai/workloads/nccl_test/nccl.py
  • src/cloudai/workloads/nccl_test/nccl_comparison_report.py
  • src/cloudai/workloads/nixl_bench/nixl_bench.py
  • tests/workloads/nixl_bench/test_report.py
💤 Files with no reviewable changes (1)
  • src/cloudai/workloads/nccl_test/nccl_comparison_report.py

Comment thread src/cloudai/report_generator/comparison_report.py
@podkidyshev
podkidyshev marked this pull request as ready for review August 7, 2026 14:41
Comment thread src/cloudai/metrics.py
Comment thread src/cloudai/metrics.py
Comment thread src/cloudai/metrics.py Outdated
Comment thread src/cloudai/metrics.py
Comment thread src/cloudai/metrics.py
Comment thread src/cloudai/report_generator/comparison_report.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/cloudai/metrics.py`:
- Around line 86-93: Update the class methods register_metrics and
register_dimensions to explicitly annotate their return type as None, preserving
their existing registry mutation behavior and satisfying Ruff ANN206.

In `@tests/test_metrics.py`:
- Around line 61-75: Add regression coverage in the metrics tests alongside
test_merge_sol_configs for assess_observation or assess_test_run_metrics using a
zero-valued MINIMIZE observation. Assert that the assessment returns the
expected unavailable attainment result and avoids division-by-zero during report
generation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: fcaa672f-4d37-4d63-b88e-d3dd7f0f6c26

📥 Commits

Reviewing files that changed from the base of the PR and between 013ebc6 and 7be6525.

📒 Files selected for processing (2)
  • src/cloudai/metrics.py
  • tests/test_metrics.py

Comment thread src/cloudai/metrics.py
Comment thread tests/test_metrics.py

@jj10306 jj10306 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@podkidyshev
podkidyshev merged commit 6b7ba0d into main Aug 11, 2026
6 checks passed
@podkidyshev
podkidyshev deleted the ipod/sol-1 branch August 11, 2026 10:24
@coderabbitai coderabbitai Bot mentioned this pull request Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants