chore(assessment): Enhance cost tracking features - #1133
Conversation
…sment processing - Introduced functions to estimate stage costs based on input/output tokens and model pricing. - Added cost tracking for pre-filter and assessment stages, ensuring costs are recorded in the execution bag. - Updated models to include RunCost and RunPreFilterCost for better cost management. - Refactored assessment configuration resolution to streamline model name retrieval for L2 assessments. - Enhanced validation for input schema to support strict column requirements. - Updated tests to cover new cost tracking functionality and ensure accurate cost calculations across stages. - Improved documentation to reflect changes in cost handling and assessment processing.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
OpenAPI changes 🔴 8 breaking changesCaution Downstream consumers may need an update before merging. Breaking changes ·
|
| Method | Path | Change | |
|---|---|---|---|
| 🔴 | GET |
/api/v1/assessment/assessments |
removed the optional property data/anyOf[subschema #1]/items/executions from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/assessments/{assessment_id} |
removed the optional property data/anyOf[subschema #1: AssessmentPublic]/executions from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/runs |
removed the optional property data/anyOf[subschema #1]/items/batch_job_id from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/runs |
removed the optional property data/anyOf[subschema #1]/items/execution from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/runs/{run_id} |
removed the optional property data/anyOf[subschema #1: AssessmentRunPublic]/batch_job_id from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/runs/{run_id} |
removed the optional property data/anyOf[subschema #1: AssessmentRunPublic]/execution from the response with the 200 status |
| 🔴 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
removed the optional property data/anyOf[subschema #1: AssessmentRunPublic]/batch_job_id from the response with the 200 status |
| 🔴 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
removed the optional property data/anyOf[subschema #1: AssessmentRunPublic]/execution from the response with the 200 status |
Full changelog · 53
| Method | Path | Change | |
|---|---|---|---|
| 🔴 | GET |
/api/v1/assessment/assessments |
removed the optional property data/anyOf[subschema #1]/items/executions from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/assessments/{assessment_id} |
removed the optional property data/anyOf[subschema #1: AssessmentPublic]/executions from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/runs |
removed the optional property data/anyOf[subschema #1]/items/batch_job_id from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/runs |
removed the optional property data/anyOf[subschema #1]/items/execution from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/runs/{run_id} |
removed the optional property data/anyOf[subschema #1: AssessmentRunPublic]/batch_job_id from the response with the 200 status |
| 🔴 | GET |
/api/v1/assessment/runs/{run_id} |
removed the optional property data/anyOf[subschema #1: AssessmentRunPublic]/execution from the response with the 200 status |
| 🔴 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
removed the optional property data/anyOf[subschema #1: AssessmentRunPublic]/batch_job_id from the response with the 200 status |
| 🔴 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
removed the optional property data/anyOf[subschema #1: AssessmentRunPublic]/execution from the response with the 200 status |
| 🟢 | — |
— |
removed the schema RunExecution |
| 🟢 | GET |
/api/v1/assessment/assessments |
added the optional property data/anyOf[subschema #1]/items/dataset_id to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments |
added the optional property data/anyOf[subschema #1]/items/dataset_name to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments |
added the optional property data/anyOf[subschema #1]/items/error_message to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments |
added the optional property data/anyOf[subschema #1]/items/run_stats to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments |
added the required property data/anyOf[subschema #1]/items/counts to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments/{assessment_id} |
added the optional property data/anyOf[subschema #1: AssessmentPublic]/dataset_id to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments/{assessment_id} |
added the optional property data/anyOf[subschema #1: AssessmentPublic]/dataset_name to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments/{assessment_id} |
added the optional property data/anyOf[subschema #1: AssessmentPublic]/error_message to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments/{assessment_id} |
added the optional property data/anyOf[subschema #1: AssessmentPublic]/run_stats to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/assessments/{assessment_id} |
added the required property data/anyOf[subschema #1: AssessmentPublic]/counts to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/datasets/{dataset_id}/rows |
endpoint added |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/cost to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/dataset_id to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/dataset_name to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/experiment_name to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/input to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/pipeline to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/prefilter_total_passed to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/prefilter_total_rejected to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/prefilter_total_rows to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/stage to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs |
added the optional property data/anyOf[subschema #1]/items/stage_status to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/cost to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/dataset_id to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/dataset_name to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/experiment_name to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/input to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/pipeline to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/prefilter_total_passed to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/prefilter_total_rejected to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/prefilter_total_rows to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/stage to the response with the 200 status |
| 🟢 | GET |
/api/v1/assessment/runs/{run_id} |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/stage_status to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/cost to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/dataset_id to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/dataset_name to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/experiment_name to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/input to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/pipeline to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/prefilter_total_passed to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/prefilter_total_rejected to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/prefilter_total_rows to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/stage to the response with the 200 status |
| 🟢 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
added the optional property data/anyOf[subschema #1: AssessmentRunPublic]/stage_status to the response with the 200 status |
main ↔ 354f1672 · generated by oasdiff
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.
Original PR description
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
Explain the motivation for making this change. What existing problem does the pull request solve?
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.