You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v1.5.1: Fix do_predict crash when a test batch holds a single example (#127)
This commit was created on GitHub.com and signed with GitHub’s verified signature.
do_predict flattened each batch with .squeeze(). For a batch of one example this turns person_id,
index_date, logits and labels into scalars: iterating over the timestamps raises
"TypeError: 'float' object is not iterable", the fallback then raises "object of type 'float' has no
len()", and building the prediction DataFrame from scalars would fail as well. Use .reshape(-1), which
keeps a 1-D array for any batch size and gives the same result for batches of two or more.
Seen in MEDS-DEV's integration tests, where small demo datasets can leave a single test example.
Claude-Session: https://claude.ai/code/session_01NJQdbGWvxMLCYYDmaTniS4
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>