Save and display OOD scores#814
Merged
mihow merged 15 commits intodeployments/ood.antenna.insectai.orgfrom Apr 30, 2025
Merged
Conversation
✅ Deploy Preview for antenna-preview canceled.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for saving and displaying out‐of‐distribution (OOD) scores. Key changes include:
- Adding a new UI column and cell component (OODScoreCell) to display the OOD score.
- Extending the Occurrence model with getters for determinationOODScore and determinationOODScoreLabel.
- Updating ML pipeline processing, API schemas, serializers, and migrations to include and propagate the new OOD score field.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ui/src/pages/occurrences/occurrence-columns.tsx | Adds a new column and UI cell component (OODScoreCell) to display the OOD Score. |
| ui/src/data-services/models/occurrence.ts | Defines getters for determinationOODScore and determinationOODScoreLabel. |
| ami/ml/schemas.py | Adds the optional ood_score field to the ClassificationResponse schema. |
| ami/ml/models/pipeline.py | Updates classification creation by including ood_score in the NEW_FIELDS array and passing it through. |
| ami/main/models.py | Adds new fields (ood_score, determination_ood_score) and updates occurrence determination logic in update_occurrence_determination(). |
| ami/main/migrations/0063_classification_ood_score_and_more.py | Creates new database fields for ood_score and determination_ood_score. |
| ami/main/api/views.py & ami/main/api/serializers.py | Updates API view filtering and serializer definitions to include determination_ood_score and ood_score. |
✅ Deploy Preview for antenna-ood canceled.
|
* feat: Added pgvector extension * feat: Added features field to the Classification model * changed taxon and detection to autocomplete fields in the ClassificationAdmin model * feat: added similar action to the ClassificationViewset * chore: changed features vector field name to features_2048 * chore: changed features vector field name to features_2048 * feat: read features vector from processing service ClassificationResponse and save it to Classification object * test: added tests for PGVector distance metrics * updated docker-compose.ci.yml to use the same postgres image as docker-compose.yml
de1fbd1 to
2a75c23
Compare
e7bed1a to
74d606b
Compare
…nickLab/antenna into feat/save-ood-scores
…nickLab/antenna into feat/save-ood-scores
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(Warning: this example shows Oregon moths or non-moths run with the Panama classifier)