We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9399692 commit a333682Copy full SHA for a333682
tests/tests_pytorch/callbacks/test_model_checkpoint_manual_opt.py
@@ -110,7 +110,7 @@ def test_model_checkpoint_manual_opt():
110
model_before_opt = load_model(best_step, model.saved_models)
111
# Load the best checkpoint
112
best_ckpt_path = trainer.checkpoint_callback.best_model_path
113
- best_ckpt = torch.load(best_ckpt_path)["state_dict"]
+ best_ckpt = torch.load(best_ckpt_path, weights_only=True)["state_dict"]
114
115
# The checkpoint should match the model before opt.step(), not after
116
for layer_name, layer_value in best_ckpt.items():
0 commit comments