curl --request POST \
--url https://api.fireworks.ai/v1/accounts/{account_id}/evaluatorsV2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluator": {
"displayName": "<string>",
"description": "<string>",
"criteria": [
{
"type": "TYPE_UNSPECIFIED",
"name": "<string>",
"description": "<string>",
"codeSnippets": {
"language": "<string>",
"fileContents": {},
"entryFile": "<string>",
"entryFunc": "<string>"
}
}
],
"requirements": "<string>",
"entryPoint": "<string>",
"commitHash": "<string>",
"source": {
"type": "TYPE_UNSPECIFIED",
"githubRepositoryName": "<string>"
},
"defaultDataset": "<string>"
},
"evaluatorId": "<string>"
}
'{
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updateTime": "2023-11-07T05:31:56Z",
"state": "STATE_UNSPECIFIED",
"criteria": [
{
"type": "TYPE_UNSPECIFIED",
"name": "<string>",
"description": "<string>",
"codeSnippets": {
"language": "<string>",
"fileContents": {},
"entryFile": "<string>",
"entryFunc": "<string>"
}
}
],
"requirements": "<string>",
"entryPoint": "<string>",
"status": {
"code": "OK",
"message": "<string>"
},
"commitHash": "<string>",
"source": {
"type": "TYPE_UNSPECIFIED",
"githubRepositoryName": "<string>"
},
"defaultDataset": "<string>"
}Creates a custom evaluator for scoring model outputs. Evaluators use the Eval Protocol to define test cases, run model inference, and score responses. They are used with evaluation jobs and Reinforcement Fine-Tuning (RFT).
Your project should contain:
requirements.txt - Python dependencies for your evaluatortest_*.py - Pytest test file(s) with
@evaluation_test
decorated functionsRecommended: Use the ep upload
CLI command to handle all these steps automatically.
If using the API directly:
.tar.gz (respecting .gitignore)PUT the tar.gz file to the signed URLOnce active, reference the evaluator in Create Evaluation Job or Create Reinforcement Fine-tuning Job.
curl --request POST \
--url https://api.fireworks.ai/v1/accounts/{account_id}/evaluatorsV2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluator": {
"displayName": "<string>",
"description": "<string>",
"criteria": [
{
"type": "TYPE_UNSPECIFIED",
"name": "<string>",
"description": "<string>",
"codeSnippets": {
"language": "<string>",
"fileContents": {},
"entryFile": "<string>",
"entryFunc": "<string>"
}
}
],
"requirements": "<string>",
"entryPoint": "<string>",
"commitHash": "<string>",
"source": {
"type": "TYPE_UNSPECIFIED",
"githubRepositoryName": "<string>"
},
"defaultDataset": "<string>"
},
"evaluatorId": "<string>"
}
'{
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updateTime": "2023-11-07T05:31:56Z",
"state": "STATE_UNSPECIFIED",
"criteria": [
{
"type": "TYPE_UNSPECIFIED",
"name": "<string>",
"description": "<string>",
"codeSnippets": {
"language": "<string>",
"fileContents": {},
"entryFile": "<string>",
"entryFunc": "<string>"
}
}
],
"requirements": "<string>",
"entryPoint": "<string>",
"status": {
"code": "OK",
"message": "<string>"
},
"commitHash": "<string>",
"source": {
"type": "TYPE_UNSPECIFIED",
"githubRepositoryName": "<string>"
},
"defaultDataset": "<string>"
}Bearer authentication using your Fireworks API key. Format: Bearer <API_KEY>
The Account Id
A successful response.
STATE_UNSPECIFIED, ACTIVE, BUILDING, BUILD_FAILED Show child attributes
Show child attributes
Source information for the evaluator codebase.
Show child attributes
Was this page helpful?