Skip to content

feat: add pairwise trainer - #372

Merged
stephantul merged 2 commits into
mainfrom
pairwise
Sep 17, 2026
Merged

stephantul merged 2 commits into
mainfrom
pairwise

Conversation

@stephantul

Copy link
Copy Markdown
Contributor

This PR adds a classic pairwise training mechanism. The trainer takes as input pairs of texts and labels (1 for positive, 0 for negative) and trains using cosine similarity.

@stephantul
stephantul requested a review from Pringled September 17, 2026 11:47
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
model2vec/train/__init__.py 100.00% <100.00%> (ø)
model2vec/train/base.py 99.50% <100.00%> (+<0.01%) ⬆️
model2vec/train/dataset.py 100.00% <100.00%> (ø)
model2vec/train/pairs.py 100.00% <100.00%> (ø)
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.

@stephantul
stephantul merged commit 4a288b8 into main Sep 17, 2026
11 checks passed
@stephantul
stephantul deleted the pairwise branch September 17, 2026 12:15
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