Skip to content
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

Add ValorClassificationManager and refactor classification.py #720

Merged
merged 8 commits into from
Aug 27, 2024

Conversation

ntlind
Copy link
Contributor

@ntlind ntlind commented Aug 23, 2024

Improvements

  • Refactor classification.py to do fewer joins and do them farther up the chain, allowing us to store less data in ValorClassificationManager. Results in a ~2 second speedup on all classification benchmarks.
  • Implement ValorClassificationManager to allow users to add datums sequentially, rather than passing a full list
  • Disallow passing empty lists of predictions to ValorClassificationManager and ValorDetectionManager. Add tests showing users can still pass a Prediction with an empty list of annotations.
  • Split conftest into conftest_inputs and conftest_outputs. Move expected answers out of test files and into conftest_output.py
  • Fixed a bug where the number of unique labels in a classification's metadata was being counted before the label map was applied, resulting in eval_job.meta["labels"] being too high for label map evaluations.

@ntlind ntlind requested review from czaloom and ekorman as code owners August 23, 2024 20:32
@ntlind ntlind self-assigned this Aug 23, 2024
@ntlind ntlind added the feature label Aug 23, 2024
@ntlind ntlind merged commit 95f1722 into main Aug 27, 2024
14 checks passed
@ntlind ntlind deleted the add_classification_manager branch August 27, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants