Skip to content

Conversation

@stephantul
Copy link
Contributor

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
@codecov
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 <stephantul@gmail.com>

* 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 <stephantul@gmail.com>
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 <stephantul@gmail.com>

* 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 <stephantul@gmail.com>
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.

3 participants