-
Notifications
You must be signed in to change notification settings - Fork 6
Fix incorrect logits returned in API #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
partial cherry-picked from: 95a8a7b
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: trapdata/api/models/classification.py
📄 File: trapdata/ml/models/base.py (Click to Expand)
Did you find this useful? React with a 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes incorrect logits being returned in the API by restructuring how classifier results are handled and returned. The changes address issue #91 by ensuring logits are properly separated from scores in classification responses.
- Introduces a new
ClassifierResultdataclass to standardize classifier output format - Updates classification processing to correctly handle logits vs scores
- Adds comprehensive test coverage for logits functionality
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| trapdata/ml/models/base.py | Adds ClassifierResult dataclass to standardize classifier output |
| trapdata/api/tests/test_api.py | Updates tests and adds new test for logits verification |
| trapdata/api/models/classification.py | Refactors post-processing to use ClassifierResult and fix logits handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
…into fix/incorrect-logits
…ami-data-manager into fix/incorrect-logits
|
Part of RolnickLab/antenna#782 |
This PR fixes incorrect logits being returned in the API by restructuring how classifier results are handled and returned. The changes address issue #91 by ensuring logits are properly separated from scores in classification responses.