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

feat: add multilabel targets to inference pipeline, fix tests #194

Merged

Conversation

stephantul
Copy link
Member

This PR adds multilabel targets to the inference pipeline, and also fixes the tests so that this works.

I think the test solution is a bit ugly.

@stephantul stephantul requested a review from Pringled February 15, 2025 12:19
Copy link

codecov bot commented Feb 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
model2vec/inference/model.py 90.58% <100.00%> (+2.01%) ⬆️
model2vec/train/classifier.py 97.29% <100.00%> (ø)
tests/test_inference.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@stephantul stephantul merged commit 8e944ab into add-multilabel-classification Feb 15, 2025
6 checks passed
@Pringled Pringled changed the title add multilabel targets to inference pipeline, fix tests feat: add multilabel targets to inference pipeline, fix tests Feb 15, 2025
@stephantul stephantul deleted the add-pipeline-to-multilbale branch February 15, 2025 12:23
Pringled added a commit that referenced this pull request Feb 16, 2025
* Added multilabel option to training

* Added multilabel option to training

* Added multilabel option to training

* Added multilabel option to training

* Added multilabel option to training

* Added multilabel option to training

* Added threshold to predict

* Updated docs

* Updated docs

* Removed fallback logic

* Updated docs

* Updated docs

* Resolved feedback

* Update model2vec/train/README.md

Co-authored-by: Stephan Tulkens <[email protected]>

* Resolved feedback

* Resolved feedback

* Resolved feedback

* Resolved feedback

* add multilabel targets, fix tests (#194)

* Fixed bug with array conversion

* Optimized inference performance

* Changed classes to np array

* Added int as possible label type

* Added int as possible label type

* Use previous logic

* Updated type check

* Updated type check

* Updated type check logic

* Only return object type array for multilabel

---------

Co-authored-by: Stephan Tulkens <[email protected]>
Pringled added a commit that referenced this pull request Feb 17, 2025
* Added multilabel option to training

* Added multilabel option to training

* Added multilabel option to training

* Added multilabel option to training

* Added multilabel option to training

* Added multilabel option to training

* Added threshold to predict

* Updated docs

* Updated docs

* Removed fallback logic

* Updated docs

* Updated docs

* Resolved feedback

* Update model2vec/train/README.md

Co-authored-by: Stephan Tulkens <[email protected]>

* Resolved feedback

* Resolved feedback

* Resolved feedback

* Resolved feedback

* add multilabel targets, fix tests (#194)

* Fixed bug with array conversion

* Optimized inference performance

* Changed classes to np array

* Added int as possible label type

* Added int as possible label type

* Use previous logic

* Updated type check

* Updated type check

* Updated type check logic

* Added evaluate function

* Updated evaluate, updated tests to also include int type labels

* Updated docs

* Fixed inference tests

* Refactored evaluate. Made evaluate available for pipelines. Simplified evaluate logic.

* Removed unused imports

* Updated classes logic

---------

Co-authored-by: Stephan Tulkens <[email protected]>
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