Skip to content

Commit 4138d41

Browse files
hmgaudeckerclaude
andcommitted
Drop dead-regime distributed=False workaround on assets grid.
The pylcm sharding-consistency validator now requires every state to carry the same `distributed` flag in every regime that declares it. Restoring `assets` to the shared grid lets the dead regime's V-array sharding match the alive regimes that transition into it. Also drops the test that codified the workaround. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 63f0b9b commit 4138d41

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

src/aca_model/baseline/regimes/_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def build_dead_regime(grids: Grids) -> Regime:
449449
"utility_scale_factor": preferences.utility_scale_factor,
450450
},
451451
states={
452-
"assets": grids.assets.replace(distributed=False),
452+
"assets": grids.assets,
453453
"pref_type": grids.pref_type,
454454
},
455455
active=lambda _age: True,

tests/test_model_creation.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,6 @@ def test_dead_regime_is_terminal() -> None:
5858
assert model.user_regimes["dead"].terminal
5959

6060

61-
def test_dead_regime_assets_grid_not_distributed() -> None:
62-
"""The terminal `dead` regime declares its `assets` grid non-distributed.
63-
64-
`dead` carries only a tiny `[pref_type, assets]` value function;
65-
sharding its assets axis across devices buys nothing and makes its
66-
V-array sharding disagree with what the multi-GPU solve produces for
67-
the regimes that transition into it.
68-
"""
69-
dead = build_regime("dead")
70-
assert dead.states["assets"].distributed is False
71-
72-
7361
def test_non_terminal_regimes_not_terminal() -> None:
7462
model = make_baseline_model(n_subjects=1)
7563
for name in REGIME_SPECS:

0 commit comments

Comments
 (0)