Merge branch 'api_3' into api_4

This commit is contained in:
Xi Yan 2025-03-12 11:38:54 -07:00
commit 076f0cf1bb
19 changed files with 774 additions and 159 deletions

View file

@ -230,7 +230,7 @@
}
}
},
"/v1/eval/benchmark/{benchmark_id}/jobs/{job_id}": {
"/v1/eval/jobs/{job_id}": {
"get": {
"responses": {
"200": {
@ -269,18 +269,18 @@
"description": "Get the EvalJob object for a given job id and benchmark id.",
"parameters": [
{
"name": "benchmark_id",
"name": "job_id",
"in": "path",
"description": "The ID of the benchmark to run the evaluation on.",
"description": "The ID of the job to get the status of.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "job_id",
"in": "path",
"description": "The ID of the job to get the status of.",
"name": "benchmark_id",
"in": "query",
"description": "The ID of the benchmark to run the evaluation on.",
"required": true,
"schema": {
"type": "string"
@ -312,18 +312,18 @@
"description": "Cancel a job.",
"parameters": [
{
"name": "benchmark_id",
"name": "job_id",
"in": "path",
"description": "The ID of the benchmark to run the evaluation on.",
"description": "The ID of the job to cancel.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "job_id",
"in": "path",
"description": "The ID of the job to cancel.",
"name": "benchmark_id",
"in": "query",
"description": "The ID of the benchmark to run the evaluation on.",
"required": true,
"schema": {
"type": "string"
@ -1116,7 +1116,7 @@
}
}
},
"/v1/eval/benchmark/{benchmark_id}/jobs": {
"/v1/eval/jobs": {
"post": {
"responses": {
"200": {
@ -1146,17 +1146,7 @@
"Eval"
],
"description": "Run an evaluation on a benchmark.",
"parameters": [
{
"name": "benchmark_id",
"in": "path",
"description": "The ID of the benchmark to run the evaluation on.",
"required": true,
"schema": {
"type": "string"
}
}
],
"parameters": [],
"requestBody": {
"content": {
"application/json": {
@ -6270,6 +6260,10 @@
"EvaluateBenchmarkRequest": {
"type": "object",
"properties": {
"benchmark_id": {
"type": "string",
"description": "The ID of the benchmark to run the evaluation on."
},
"candidate": {
"$ref": "#/components/schemas/EvalCandidate",
"description": "Candidate to evaluate on. - { \"type\": \"model\", \"model\": \"Llama-3.1-8B-Instruct\", \"sampling_params\": {...}, \"system_message\": \"You are a helpful assistant.\", } - { \"type\": \"agent\", \"config\": {...}, }"
@ -6277,6 +6271,7 @@
},
"additionalProperties": false,
"required": [
"benchmark_id",
"candidate"
],
"title": "EvaluateBenchmarkRequest"

View file

@ -142,7 +142,7 @@ paths:
schema:
$ref: '#/components/schemas/BatchCompletionRequest'
required: true
/v1/eval/benchmark/{benchmark_id}/jobs/{job_id}:
/v1/eval/jobs/{job_id}:
get:
responses:
'200':
@ -168,19 +168,19 @@ paths:
description: >-
Get the EvalJob object for a given job id and benchmark id.
parameters:
- name: benchmark_id
in: path
description: >-
The ID of the benchmark to run the evaluation on.
required: true
schema:
type: string
- name: job_id
in: path
description: The ID of the job to get the status of.
required: true
schema:
type: string
- name: benchmark_id
in: query
description: >-
The ID of the benchmark to run the evaluation on.
required: true
schema:
type: string
delete:
responses:
'200':
@ -199,7 +199,7 @@ paths:
- Scoring
description: Cancel a job.
parameters:
- name: benchmark_id
- name: job_id
in: path
description: >-
The ID of the benchmark to run the evaluation on.
@ -764,7 +764,7 @@ paths:
schema:
$ref: '#/components/schemas/EmbeddingsRequest'
required: true
/v1/eval/benchmark/{benchmark_id}/jobs:
/v1/eval/jobs:
post:
responses:
'200':
@ -787,14 +787,7 @@ paths:
tags:
- Eval
description: Run an evaluation on a benchmark.
parameters:
- name: benchmark_id
in: path
description: >-
The ID of the benchmark to run the evaluation on.
required: true
schema:
type: string
parameters: []
requestBody:
content:
application/json:
@ -4369,6 +4362,10 @@ components:
EvaluateBenchmarkRequest:
type: object
properties:
benchmark_id:
type: string
description: >-
The ID of the benchmark to run the evaluation on.
candidate:
$ref: '#/components/schemas/EvalCandidate'
description: >-
@ -4377,6 +4374,7 @@ components:
} - { "type": "agent", "config": {...}, }
additionalProperties: false
required:
- benchmark_id
- candidate
title: EvaluateBenchmarkRequest
EvalJob: