Skip to content

fix(benchmark): don't reject an accuracy-only run for listing many endpoints - #453

Open
leopck wants to merge 1 commit into
mlcommons:mainfrom
leopck:fix/acc-only-multi-endpoint
Open

fix(benchmark): don't reject an accuracy-only run for listing many endpoints#453
leopck wants to merge 1 commit into
mlcommons:mainfrom
leopck:fix/acc-only-multi-endpoint

Conversation

@leopck

@leopck leopck commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

An accuracy-only run that lists more than one endpoint fails during setup:

    Failed to connect to endpoint: 1 validation error for HTTPClientConfig
      Value error, num_workers (1) must be a multiple of the number of
      endpoint URLs (4) ... Got remainder 1.

and exits 3 before any dataset is planned or scored.

Two forced choices collide. setup_benchmark pins num_workers=1 and max_connections=1 for every TestMode.ACC run, deliberately, so the compliance gate's single_stream assertion holds. HTTPClientConfig separately requires num_workers to divide the endpoint count so each endpoint gets equal workers. One worker cannot divide four endpoints, so the run is refused.

What makes this a defect rather than a tight constraint is that the rejected client does no work. Both SWE-bench scorers set SKIP_ENDPOINT_PHASE, so no sample is ever issued through it -- the same run logs "Expected samples: 0" moments earlier. A validator is rejecting a configuration on behalf of a component that never runs, and it takes the whole run down with it.

Give the idle client a single endpoint when the run will issue nothing, so the divisibility invariant still means what it says for runs that do issue. Scorers that fan work out across endpoints themselves read the endpoint list from the run's config.yaml rather than from this client, so this does not narrow the run.

The proper fix is to skip building an issuer at all when nothing will be issued. That requires a null issuer type, because BenchmarkSession takes a non-None issuer, and is a larger change than this defect warrants on its own; endpoints[:1] is the narrow form of it, not the intended end state.

Only reachable with more than one endpoint in accuracy-only mode: a single-endpoint run divides exactly and never surfaces it.

What does this PR do?

Type of change

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

@leopck
leopck requested a review from a team August 19, 2026 13:41
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the size/normal PR Review Policy: <=500 non-test lines & <=20 files label Aug 19, 2026
@leopck
leopck force-pushed the fix/acc-only-multi-endpoint branch from 9acf127 to 8f5247f Compare August 19, 2026 13:41
@codecov-commenter

codecov-commenter commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@c30860a). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...c/inference_endpoint/commands/benchmark/execute.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #453   +/-   ##
=======================================
  Coverage        ?   80.98%           
=======================================
  Files           ?      150           
  Lines           ?    20210           
  Branches        ?        0           
=======================================
  Hits            ?    16367           
  Misses          ?     3843           
  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.

…dpoints

An accuracy-only run that lists more than one endpoint fails during setup:

    Failed to connect to endpoint: 1 validation error for HTTPClientConfig
      Value error, num_workers (1) must be a multiple of the number of
      endpoint URLs (4) ... Got remainder 1.

and exits 3 before any dataset is planned or scored.

Two forced choices collide. setup_benchmark pins num_workers=1 and
max_connections=1 for every TestMode.ACC run, deliberately, so the compliance
gate's single_stream assertion holds. HTTPClientConfig separately requires
num_workers to divide the endpoint count so each endpoint gets equal workers.
One worker cannot divide four endpoints, so the run is refused.

What makes this a defect rather than a tight constraint is that the rejected
client does no work. Both SWE-bench scorers set SKIP_ENDPOINT_PHASE, so no
sample is ever issued through it -- the same run logs "Expected samples: 0"
moments earlier. A validator is rejecting a configuration on behalf of a
component that never runs, and it takes the whole run down with it.

Give the idle client a single endpoint when the run will issue nothing, so the
divisibility invariant still means what it says for runs that do issue.
Scorers that fan work out across endpoints themselves read the endpoint list
from the run's config.yaml rather than from this client, so this does not
narrow the run.

The proper fix is to skip building an issuer at all when nothing will be
issued. That requires a null issuer type, because BenchmarkSession takes a
non-None issuer, and is a larger change than this defect warrants on its own;
endpoints[:1] is the narrow form of it, not the intended end state.

Only reachable with more than one endpoint in accuracy-only mode: a
single-endpoint run divides exactly and never surfaces it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/normal PR Review Policy: <=500 non-test lines & <=20 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants