Skip to content

Commit 60deff4

Browse files
polinabinder1claude
andcommitted
evo2_megatron: load Savanna HF checkpoints with weights_only=False
torch 2.6 changed the default of `weights_only` to True. The Savanna checkpoint pickle includes numpy globals (`numpy.core.multiarray._reconstruct`), which the safer loader rejects. The converter then exits 0 with no output written and the error gets buried in stderr — silent failure. The Savanna repos under arcinstitute/* are trusted sources, so load with weights_only=False. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b0953dc commit 60deff4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bionemo-recipes/recipes/evo2_megatron/src/bionemo/evo2/utils/checkpoint/savanna_to_mbridge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def load_savanna_state_dict(path: Path) -> dict[str, torch.Tensor]:
135135
Returns:
136136
Flat state dict with keys like 'sequential.{i}.xxx'.
137137
"""
138-
raw = torch.load(str(path), map_location="cpu", weights_only=True, mmap=True)
138+
raw = torch.load(str(path), map_location="cpu", weights_only=False, mmap=True)
139139
if "module" in raw:
140140
raw = raw["module"]
141141

0 commit comments

Comments
 (0)