Skip to content

Expose classifier contract results - #22

Merged
henry3260 merged 1 commit into
mainfrom
refactor-classifier-contract
May 31, 2026
Merged

Expose classifier contract results#22
henry3260 merged 1 commit into
mainfrom
refactor-classifier-contract

Conversation

@henry3260

Copy link
Copy Markdown
Owner

Summary

  • add contract-based classify_result() output for EnsembleClassifier using MultiClassResult / ClassificationResult
  • add classify_result() to TemplateClassifier while preserving the existing classify() dict API
  • add focused tests covering ensemble contract results, OOD mapping, and template classifier compatibility

Compatibility

  • Existing predict_with_confidence() tuple callers are unchanged
  • Existing TemplateClassifier.classify() dict callers are unchanged

Tests

  • .venv/bin/python -m pytest -vv tests/classifier/test_classifier_contract.py
  • .venv/bin/python -m pytest tests

Note: ruff is not installed in this local environment; command -v ruff and .venv/bin/ruff were unavailable.

@henry3260
henry3260 merged commit 9fd5844 into main May 31, 2026
2 checks passed
@henry3260
henry3260 deleted the refactor-classifier-contract branch May 31, 2026 17:17
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.

1 participant