postBenchmarkRuns method
Admits and queues a benchmark run against a model or your own endpoint, and answers 202 with the receipt.
Admits and queues a benchmark run against a model or your own endpoint, and answers 202 with the receipt. It is an ADMISSION, not a result: the work is done by the harness afterwards and the numbers appear on the leaderboard as it completes them. Cost is bounded by the store rather than by a quota: attempts are append-only and keyed by (benchmark, item, model), so an (item, model) pair already attempted is skipped instead of re-spent, and re-queuing the same run is close to free. Validation is up front and total — a request with neither model nor endpoint is a 400, one with no benchmarks is a 400, and any benchmark id outside the catalog is a 422 naming exactly which ids were unknown, so a typo never silently queues a partial run.
Parameters:
- Suite suite (required):
Implementation
Future<Admission?> postBenchmarkRuns(Suite suite,) async {
final response = await postBenchmarkRunsWithHttpInfo(suite,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Admission',) as Admission;
}
return null;
}