Skip to content

Commit 12921b3

Browse files
leopckarekay-nv
authored andcommitted
feat(swe-bench): bind each unit to an endpoint by shard index
Every unit was submitted with endpoint_urls[:1], so a fleet configured with N engines sent all of its work to the first one and left the other N-1 idle. The comment justified this by noting that the service accepts exactly one endpoint per run and that the fleet's parallelism comes from running many units -- true, but it does not follow that every unit must pick the same one. Two consequences. The obvious one is a throughput ceiling: concurrency is bounded by one engine no matter how much hardware the run was given. The serious one is a measurement hazard -- a single engine's behaviour decides the whole run's accuracy, so one degraded engine is indistinguishable from a degraded model, which is precisely the confusion the endpoint fingerprint exists to prevent. Bind unit -> endpoint by shard index instead. The mapping is deterministic, so a retried unit lands on the endpoint it was originally measured against and stays comparable to its first attempt, and a run with one endpoint behaves exactly as before.
1 parent 6815bd6 commit 12921b3

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎src/inference_endpoint/evaluation/swe_bench_fleet_scorer.py‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,17 @@ def _instance_ids(self) -> list[str]:
326326
]
327327

328328
def _submit_unit(self, service_url: str, unit: Unit) -> str:
329+
# The service accepts exactly one endpoint URL per run, so a unit is
330+
# bound to exactly one endpoint. Sending every unit to endpoint 0 would
331+
# funnel the whole fleet through a single engine while the rest idle,
332+
# which is both a throughput ceiling and a measurement hazard: one
333+
# engine's behaviour would decide the entire run's accuracy. Binding by
334+
# shard index spreads units deterministically -- the same unit always
335+
# gets the same endpoint, so a retry is comparable to its first attempt.
336+
endpoint = self._endpoint_urls[unit.shard % len(self._endpoint_urls)]
329337
payload = {
330338
"model_name": self._model_name,
331-
# The service accepts exactly one endpoint URL per run; the fleet's
332-
# parallelism comes from running many units, not many endpoints.
333-
"endpoint_urls": self._endpoint_urls[:1],
339+
"endpoint_urls": [endpoint],
334340
"endpoint_api_key": self._endpoint_api_key,
335341
"generation_params": self._generation_params,
336342
"subset": self.options["subset"],

0 commit comments

Comments
 (0)