Skip to content

Commit 42714c1

Browse files
authored
Merge pull request #154 from togethercomputer/ruslan/sync-with-evals
Ruslan/sync with evals
2 parents c8fe46e + 2fe7421 commit 42714c1

1 file changed

Lines changed: 249 additions & 67 deletions

File tree

openapi.yaml

Lines changed: 249 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -3839,150 +3839,332 @@ paths:
38393839
schema:
38403840
$ref: '#/components/schemas/BatchErrorResponse'
38413841

3842+
/evaluation:
3843+
post:
3844+
tags:
3845+
- evaluation
3846+
summary: Create an evaluation job
3847+
operationId: createEvaluationJob
3848+
requestBody:
3849+
required: true
3850+
content:
3851+
application/json:
3852+
schema:
3853+
$ref: "#/components/schemas/EvaluationTypedRequest"
3854+
responses:
3855+
"200":
3856+
description: "Evaluation job created successfully"
3857+
content:
3858+
application/json:
3859+
schema:
3860+
$ref: "#/components/schemas/EvaluationResponse"
3861+
"400":
3862+
description: "Invalid request format"
3863+
content:
3864+
application/json:
3865+
schema:
3866+
$ref: "#/components/schemas/ErrorData"
3867+
"500":
3868+
description: "Failed to create evaluation job"
3869+
content:
3870+
application/json:
3871+
schema:
3872+
$ref: "#/components/schemas/ErrorData"
3873+
get:
3874+
tags:
3875+
- evaluation
3876+
summary: Get all evaluation jobs
3877+
operationId: getAllEvaluationJobs
3878+
parameters:
3879+
- name: status
3880+
in: query
3881+
required: false
3882+
schema:
3883+
type: string
3884+
default: "pending"
3885+
- name: limit
3886+
in: query
3887+
required: false
3888+
schema:
3889+
type: integer
3890+
default: 10
3891+
- name: userId
3892+
in: query
3893+
required: false
3894+
description: "Admin users can specify a user ID to filter jobs. Pass empty string to get all jobs."
3895+
schema:
3896+
type: string
3897+
responses:
3898+
"200":
3899+
description: "evaluation jobs retrieved successfully"
3900+
content:
3901+
application/json:
3902+
schema:
3903+
type: array
3904+
items:
3905+
$ref: "#/components/schemas/EvaluationJob"
3906+
"400":
3907+
description: "Invalid request format"
3908+
content:
3909+
application/json:
3910+
schema:
3911+
$ref: "#/components/schemas/ErrorData"
3912+
"500":
3913+
description: "Error retrieving jobs from manager"
3914+
content:
3915+
application/json:
3916+
schema:
3917+
$ref: "#/components/schemas/ErrorData"
3918+
/evaluation/model-list:
3919+
get:
3920+
tags:
3921+
- evaluation
3922+
summary: Get model list
3923+
operationId: getModelList
3924+
parameters:
3925+
- name: model_source
3926+
in: query
3927+
required: false
3928+
schema:
3929+
type: string
3930+
default: "all"
3931+
responses:
3932+
"200":
3933+
description: "Model list retrieved successfully"
3934+
content:
3935+
application/json:
3936+
schema:
3937+
type: object
3938+
properties:
3939+
model_list:
3940+
type: array
3941+
items:
3942+
type: string
3943+
description: "The name of the model"
3944+
"400":
3945+
description: "Invalid request format"
3946+
content:
3947+
application/json:
3948+
schema:
3949+
$ref: "#/components/schemas/ErrorData"
3950+
"500":
3951+
description: "Error retrieving model list"
3952+
content:
3953+
application/json:
3954+
schema:
3955+
$ref: "#/components/schemas/ErrorData"
3956+
/evaluations/model-list:
3957+
get:
3958+
tags:
3959+
- evaluation
3960+
summary: Get model list
3961+
operationId: getModelListDeprecated
3962+
parameters:
3963+
- name: model_source
3964+
in: query
3965+
required: false
3966+
schema:
3967+
type: string
3968+
default: "all"
3969+
responses:
3970+
"200":
3971+
description: "Model list retrieved successfully. Deprecated! Please use /evaluation/model-list"
3972+
content:
3973+
application/json:
3974+
schema:
3975+
type: object
3976+
properties:
3977+
model_list:
3978+
type: array
3979+
items:
3980+
type: string
3981+
description: "The name of the model"
3982+
"400":
3983+
description: "Invalid request format"
3984+
content:
3985+
application/json:
3986+
schema:
3987+
$ref: "#/components/schemas/ErrorData"
3988+
"500":
3989+
description: "Error retrieving model list"
3990+
content:
3991+
application/json:
3992+
schema:
3993+
$ref: "#/components/schemas/ErrorData"
38423994
/evaluations:
38433995
get:
3844-
tags: ['Evaluations']
3845-
summary: List evaluation jobs
3846-
description: Get a list of evaluation jobs with optional filtering
3847-
operationId: evaluations-list
3848-
x-stainless-resource-name: evaluationList
3996+
tags:
3997+
- evaluation
3998+
summary: Get all evaluation jobs. Deprecated! Please use /evaluation
3999+
operationId: getAllEvaluationJobsDeprecated
38494000
parameters:
38504001
- name: status
38514002
in: query
3852-
description: Filter by job status
4003+
required: false
38534004
schema:
38544005
type: string
3855-
enum: [pending, queued, running, completed, error, user_error]
4006+
default: "pending"
38564007
- name: limit
38574008
in: query
3858-
description: Maximum number of results to return (max 100)
4009+
required: false
38594010
schema:
38604011
type: integer
3861-
minimum: 1
3862-
maximum: 100
38634012
default: 10
4013+
- name: userId
4014+
in: query
4015+
required: false
4016+
description: "Admin users can specify a user ID to filter jobs. Pass empty string to get all jobs."
4017+
schema:
4018+
type: string
38644019
responses:
3865-
'200':
3866-
description: Successful response
4020+
"200":
4021+
description: "evaluation jobs retrieved successfully"
38674022
content:
38684023
application/json:
38694024
schema:
38704025
type: array
38714026
items:
3872-
$ref: '#/components/schemas/EvaluationJob'
3873-
'400':
3874-
description: Bad request
4027+
$ref: "#/components/schemas/EvaluationJob"
4028+
"400":
4029+
description: "Invalid request format"
38754030
content:
38764031
application/json:
38774032
schema:
3878-
$ref: '#/components/schemas/ErrorData'
4033+
$ref: "#/components/schemas/ErrorData"
4034+
"500":
4035+
description: "Error retrieving jobs from manager"
4036+
content:
4037+
application/json:
4038+
schema:
4039+
$ref: "#/components/schemas/ErrorData"
38794040

38804041
/evaluation/{id}:
38814042
get:
3882-
tags: ['Evaluations']
4043+
tags:
4044+
- evaluation
38834045
summary: Get evaluation job details
3884-
description: Get details of a specific evaluation job
3885-
operationId: evaluation-get
4046+
operationId: getEvaluationJobDetails
38864047
parameters:
38874048
- name: id
38884049
in: path
38894050
required: true
3890-
description: The evaluation job ID
38914051
schema:
38924052
type: string
38934053
responses:
3894-
'200':
3895-
description: Successful response
4054+
"200":
4055+
description: "Evaluation job details retrieved successfully"
38964056
content:
38974057
application/json:
38984058
schema:
3899-
$ref: '#/components/schemas/EvaluationJob'
3900-
'404':
3901-
description: Job not found
4059+
$ref: "#/components/schemas/EvaluationJob"
4060+
"404":
4061+
description: "Evaluation job not found"
39024062
content:
39034063
application/json:
39044064
schema:
3905-
$ref: '#/components/schemas/ErrorData'
3906-
'500':
3907-
description: Internal server error
4065+
$ref: "#/components/schemas/ErrorData"
4066+
"500":
4067+
description: "Failed to get evaluation job"
39084068
content:
39094069
application/json:
39104070
schema:
3911-
$ref: '#/components/schemas/ErrorData'
4071+
$ref: "#/components/schemas/ErrorData"
39124072

39134073
/evaluation/{id}/status:
39144074
get:
3915-
tags: ['Evaluations']
4075+
tags:
4076+
- evaluation
39164077
summary: Get evaluation job status and results
3917-
description: Get the status and results of a specific evaluation job
3918-
operationId: evaluation-status
4078+
operationId: getEvaluationJobStatusAndResults
39194079
parameters:
39204080
- name: id
39214081
in: path
39224082
required: true
3923-
description: The evaluation job ID
39244083
schema:
39254084
type: string
39264085
responses:
3927-
'200':
3928-
description: Successful response
4086+
"200":
4087+
description: "Evaluation job status and results retrieved successfully"
39294088
content:
39304089
application/json:
39314090
schema:
39324091
type: object
39334092
properties:
39344093
status:
39354094
type: string
3936-
enum:
3937-
[pending, queued, running, completed, error, user_error]
3938-
example: completed
4095+
description: "The status of the evaluation job"
4096+
enum: ["completed", "error", "user_error", "running", "queued", "pending"]
39394097
results:
4098+
description: "The results of the evaluation job"
39404099
oneOf:
3941-
- $ref: '#/components/schemas/EvaluationClassifyResults'
3942-
- $ref: '#/components/schemas/EvaluationScoreResults'
3943-
- $ref: '#/components/schemas/EvaluationCompareResults'
3944-
- type: object
3945-
properties:
3946-
error:
3947-
type: string
3948-
nullable: true
3949-
'404':
3950-
description: Job not found
4100+
- $ref: "#/components/schemas/EvaluationClassifyResults"
4101+
- $ref: "#/components/schemas/EvaluationScoreResults"
4102+
- $ref: "#/components/schemas/EvaluationCompareResults"
4103+
"404":
4104+
description: "Evaluation job not found"
39514105
content:
39524106
application/json:
39534107
schema:
3954-
$ref: '#/components/schemas/ErrorData'
3955-
'500':
3956-
description: Internal server error
4108+
$ref: "#/components/schemas/ErrorData"
4109+
"500":
4110+
description: "Failed to get evaluation job"
39574111
content:
39584112
application/json:
39594113
schema:
3960-
$ref: '#/components/schemas/ErrorData'
4114+
$ref: "#/components/schemas/ErrorData"
39614115

3962-
/evaluations/model-list:
3963-
get:
3964-
tags: ['Evaluations']
3965-
summary: Get allowed models list
3966-
description: Get the list of models that are allowed for evaluation
3967-
operationId: evaluations-model-list
4116+
/evaluation/{id}/update:
4117+
post:
4118+
tags:
4119+
- evaluation
4120+
summary: Update evaluation job status and results
4121+
operationId: updateEvaluationJobStatusAndResults
4122+
parameters:
4123+
- name: id
4124+
in: path
4125+
required: true
4126+
schema:
4127+
type: string
4128+
requestBody:
4129+
required: true
4130+
content:
4131+
application/json:
4132+
schema:
4133+
type: object
4134+
properties:
4135+
status:
4136+
type: string
4137+
enum: [completed, error, user_error, running, queued, pending]
4138+
results:
4139+
type: object
4140+
description: "The results of the evaluation job. The concrete structure depends on the type of evaluation job"
4141+
error:
4142+
type: string
4143+
description: "Error message when status is 'error' or 'user_error'"
39684144
responses:
3969-
'200':
3970-
description: Successful response
4145+
"200":
4146+
description: "Evaluation job status updated successfully"
39714147
content:
39724148
application/json:
39734149
schema:
39744150
type: object
39754151
properties:
3976-
model_list:
3977-
type: array
3978-
items:
3979-
type: string
3980-
'500':
3981-
description: Internal server error
4152+
workflow_id:
4153+
type: string
4154+
status:
4155+
type: string
4156+
"400":
4157+
description: "Invalid request format"
39824158
content:
39834159
application/json:
39844160
schema:
3985-
$ref: '#/components/schemas/ErrorData'
4161+
$ref: "#/components/schemas/ErrorData"
4162+
"500":
4163+
description: "Failed to update job status"
4164+
content:
4165+
application/json:
4166+
schema:
4167+
$ref: "#/components/schemas/ErrorData"
39864168

39874169
/realtime:
39884170
get:

0 commit comments

Comments
 (0)