Skip to content

feat: add focal loss - #391

Merged
stephantul merged 2 commits into
mainfrom
add-focal-loss
Oct 8, 2026
Merged

stephantul merged 2 commits into
mainfrom
add-focal-loss

Conversation

@stephantul

Copy link
Copy Markdown
Contributor

This PR adds a focal loss to the classification trainer.

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Adds focal loss implementations to the training classifier.

Fix the nonfinite gradients for fractional focal_gamma before merging.

Reviews (1) · Last reviewed commit: "feat: add focal loss" · Reviewed by Greptile

Comment thread model2vec/train/classifier.py Outdated
Comment thread tests/test_trainable.py
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
model2vec/train/classifier.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 428cd7a into main Oct 8, 2026
11 checks passed
@stephantul
stephantul deleted the add-focal-loss branch October 8, 2026 10:35
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