Merge pull request #4009 from omnivore-app/fix/undefined-score

only score candidates without scores
This commit is contained in:
Hongbo Wu 2024-05-29 18:55:30 +08:00 committed by GitHub
commit 0634d2549e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

1
ml/digest-score/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.pkl

View file

@ -191,7 +191,7 @@ const rankCandidates = async (
const newScores = await getScores(data)
// update scores for candidates
candidates.forEach((item) => {
unscoredCandidates.forEach((item) => {
item.score = newScores[item.id]['score'] || 0
})