Skip to content

feat(framework): add classifier support to Eval#282

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit intomainfrom
abhi-feat-framework-eval-classifiers
Apr 15, 2026
Merged

feat(framework): add classifier support to Eval#282
Abhijeet Prasad (AbhiPrasad) merged 1 commit intomainfrom
abhi-feat-framework-eval-classifiers

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

Add a new classifiers parameter to Eval/EvalAsync/Evaluator that runs classification functions alongside scorers. Classifier results are recorded under a dedicated classifications field on EvalResult and logged to classifier-typed spans.

Based on JS PR: braintrustdata/braintrust-sdk-javascript#1553
and the spec: https://github.com/braintrustdata/braintrust-spec/blob/main/docs/telemetry/classifier.md

Add a new `classifiers` parameter to `Eval`/`EvalAsync`/`Evaluator` that
runs classification functions alongside scorers. Classifier results are
recorded under a dedicated `classifications` field on `EvalResult` and
logged to classifier-typed spans.

Key changes:
- New `Classification` and `ClassificationItem` types in `score.py`
- `EvalClassifier` callable type and `OneOrMoreClassifications` union
- `SpanTypeAttribute.CLASSIFIER` span type
- Classifier results aggregated per-name in the root span
- `scores` is now optional when `classifiers` is provided
- Devserver and push CLI updated to propagate classifier metadata
- Tests covering classifier-only, mixed, multi-classification, and span
  logging behavior
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit f37cfec into main Apr 15, 2026
64 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-feat-framework-eval-classifiers branch April 15, 2026 11:46
@AbhiPrasad
Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants