Skip to content

feat(metrics): report input sequence lengths - #442

Open
roborluo wants to merge 1 commit into
mlcommons:mainfrom
roborluo:dev-bofengl-input-static
Open

feat(metrics): report input sequence lengths#442
roborluo wants to merge 1 commit into
mlcommons:mainfrom
roborluo:dev-bofengl-input-static

Conversation

@roborluo

@roborluo roborluo commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add input_sequence_lengths to the performance result_summary.json.

This exposes the existing ISL metric using the same full distribution
format as output_sequence_lengths:

  • total, min, max, median, average, standard deviation
  • percentile grid

What does this PR do?

Related to #439.

Expose the existing ISL metric as input_sequence_lengths in the
performance
result_summary.json, using the same full distribution format as
output_sequence_lengths:

  • total, min, max, median, average, and standard deviation
  • percentiles
  • histogram buckets and counts

Also render input sequence lengths in the terminal report.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor/cleanup

Related issues

Closes #439

Testing

  • Tests added/updated
  • All tests pass locally
    • uv run pytest tests/unit/metrics/test_report_builder.py tests/unit/ async_utils/services/metrics_aggregator/test_registry.py
    • 73 passed
  • Manual testing completed

Checklist

  • Code follows project style
  • Pre-commit hooks pass
    • Note: repo-wide mypy has 3 unrelated macOS errors for
      os.sched_setaffinity / os.sched_getaffinity.
  • Documentation updated (if needed)

@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@af3ffff). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #442   +/-   ##
=======================================
  Coverage        ?   80.40%           
=======================================
  Files           ?      149           
  Lines           ?    20106           
  Branches        ?        0           
=======================================
  Hits            ?    16166           
  Misses          ?     3940           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roborluo
roborluo requested a review from arekay-nv August 12, 2026 02:55
@roborluo
roborluo marked this pull request as ready for review August 12, 2026 05:27
@roborluo
roborluo requested a review from a team August 12, 2026 05:27

@arekay-nv arekay-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to go with the updated tests.
Can you also update the docs with the ISL updates.

Comment on lines +235 to +236
assert report.input_sequence_lengths["min"] > 0
assert set(report.input_sequence_lengths) == set(report.output_sequence_lengths)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we harden the test here to ensure that we are not mixing ISL and OSL metrics. Having min > 0 would not catch if we accidentally plug OSL stats into ISL.

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.

[Feature]: Add input sequence statistics

3 participants