Skip to content

Fix SOI uprating dtype error#602

Merged
MaxGhenis merged 2 commits intomainfrom
fix-soi-dtype-and-se-pension
Mar 14, 2026
Merged

Fix SOI uprating dtype error#602
MaxGhenis merged 2 commits intomainfrom
fix-soi-dtype-and-se-pension

Conversation

@MaxGhenis
Copy link
Contributor

@MaxGhenis MaxGhenis commented Mar 14, 2026

Summary

  • Cast SOI "Value" column to float before uprating multiplication, fixing TypeError: Invalid value ... for dtype 'int64' on newer pandas versions. This blocked build_loss_matrix() and EnhancedCPS generation.

Test plan

  • build_loss_matrix() runs without dtype error
  • EnhancedCPS generation completes

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits March 14, 2026 06:52
1. soi.py: Cast SOI "Value" column to float before uprating multiplication,
   fixing TypeError on newer pandas that reject float-into-int64 assignment.

2. extended_cps.py: Add defensive np.maximum(pred_values, 0) clip in
   _splice_cps_only_predictions for retirement contribution and SS
   sub-component variables, preventing negative values from surviving
   entity-level aggregation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…this

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MaxGhenis MaxGhenis changed the title Fix SOI dtype error and ensure non-negative retirement/SS values Fix SOI uprating dtype error Mar 14, 2026
@MaxGhenis MaxGhenis merged commit d2d6c09 into main Mar 14, 2026
6 checks passed
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