Skip to content

feat: refactor inference - #338

Open
stephantul wants to merge 4 commits into
mainfrom
refactor-inference
Open

feat: refactor inference#338
stephantul wants to merge 4 commits into
mainfrom
refactor-inference

Conversation

@stephantul

Copy link
Copy Markdown
Contributor

This PR refactors inference and removes all external dependencies.

Specifically: we no longer use scikit-learn for evaluation metrics or inference. We also don't use skops for persistence any more. Skops specifically was no longer really maintained, despite having vulnerabilities. Instead, we save the models

Roundtrip accuracy is maintained. Models are now saved using safetensors, with the config.json containing relevant information.

@stephantul
stephantul requested a review from Pringled August 4, 2026 17:44
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
model2vec/inference/__init__.py 100.00% <100.00%> (ø)
model2vec/inference/evaluation.py 100.00% <100.00%> (ø)
model2vec/inference/mlp.py 100.00% <100.00%> (ø)
model2vec/inference/model.py 100.00% <100.00%> (+7.43%) ⬆️
model2vec/train/base.py 97.91% <ø> (ø)
model2vec/train/classifier.py 98.31% <100.00%> (+0.04%) ⬆️
model2vec/train/utils.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant