Skip to content

feat: add regression#333

Merged
stephantul merged 1 commit into
mainfrom
add-regression
Jun 6, 2026
Merged

feat: add regression#333
stephantul merged 1 commit into
mainfrom
add-regression

Conversation

@stephantul
Copy link
Copy Markdown
Contributor

This PR adds a regression capability to model2vec training. This is actually just what we used to call a similarity pipeline, but with an MSE loss. Because the pipelines are the same except for the training loss, it's a relatively small change.

Of note is that I also refactored some things:

  1. Regression is now the base case, similarity is a case of regression.
  2. The cosine loss is now a module, not a simple function.

@stephantul stephantul requested a review from Pringled June 5, 2026 13:58
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

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/classifier.py 98.13% <100.00%> (ø)
model2vec/train/lightning_modules.py 98.57% <100.00%> (+0.15%) ⬆️
model2vec/train/regression.py 100.00% <100.00%> (ø)
model2vec/train/similarity.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.

Copy link
Copy Markdown
Member

@Pringled Pringled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, LGTM!

@stephantul stephantul merged commit add2daf into main Jun 6, 2026
11 checks passed
@stephantul stephantul deleted the add-regression branch June 6, 2026 05:28
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