Skip to content

Commit eea782a

Browse files
hmgaudeckerclaude
andcommitted
Use the actual scalar param key in the borrowing-constraint benchmark test.
`consumption_dollars_floor` is a DAG function output; the scalar key in `params` is `consumption_equiv_floor`. Looking up the function name raised `KeyError` before the constraint check ran. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4138d41 commit eea782a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def test_benchmark_simulate_obeys_borrowing_constraint() -> None:
7272

7373
df = result.to_dataframe(additional_targets=["cash_on_hand", "equivalence_scale"])
7474
alive = df.loc[df["regime_name"] != "dead"].copy()
75-
consumption_dollars_floor = float(params["consumption_dollars_floor"])
76-
floor = consumption_dollars_floor * alive["equivalence_scale"].to_numpy()
75+
consumption_equiv_floor = float(params["consumption_equiv_floor"])
76+
floor = consumption_equiv_floor * alive["equivalence_scale"].to_numpy()
7777
rhs = np.maximum(alive["cash_on_hand"].to_numpy(), floor)
7878
slack = rhs - alive["consumption_dollars"].to_numpy()
7979
assert (slack >= 0).all(), (

0 commit comments

Comments
 (0)