Skip to content

Commit 7fe88a5

Browse files
committed
fix some warnings
1 parent 5e182ce commit 7fe88a5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

alphafold3_pytorch/alphafold3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5270,7 +5270,7 @@ def load(
52705270

52715271
assert path.exists() and path.is_file()
52725272

5273-
package = torch.load(str(path), map_location = map_location)
5273+
package = torch.load(str(path), map_location = map_location, weights_only = True)
52745274

52755275
model_package = package['model']
52765276
current_version = version('alphafold3_pytorch')
@@ -5293,7 +5293,7 @@ def init_and_load(
52935293

52945294
assert path.is_file()
52955295

5296-
package = torch.load(str(path), map_location = map_location)
5296+
package = torch.load(str(path), map_location = map_location, weights_only = True)
52975297

52985298
model_package = package['model']
52995299

alphafold3_pytorch/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def load(
584584

585585
# load optimizer and scheduler states
586586

587-
package = torch.load(str(path))
587+
package = torch.load(str(path), weights_only = True)
588588

589589
unwrapped_optimizer = _unwrap_objects(self.optimizer)
590590

0 commit comments

Comments
 (0)