Repository navigation
fix(scoring): treat a null scores list as a reply with no entries - #154
Conversation
A reply of {"scores": null} made `for entry in entries` raise TypeError,
so score_in_batches logged a stack trace and marked the run degraded
instead of the "Scored none of N articles: the reply had 0 entries"
warning PR #128 added for a reply with no scores. `or []` gives null
the same path as a missing key. No model has been seen sending null;
the case came from the PR #128 review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Reviewed the diff. 🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why
A scoring reply of
{"scores": null}raisedTypeErroratsrc/cyris/service_layer/scoring.py:96.score_in_batchescaught it, so the run went on, but it logged a stack trace and marked the run degraded instead of the "Scored none of N articles: the reply had 0 entries" warning that PR #128 added. Raised in the PR #128 review; no model has been seen sending null.What
data.get("scores") or []gives null the same path as a missing key.tests/test_scoring.pyadds anull scorescase totest_a_batch_scoring_nothing_warns. It was red (TypeError) before the fix.Verification
scripts/check.sh: 4852 passed.🤖 Generated with Claude Code