Skip to content

Commit

Permalink
set weights_only=False in torch.load
Browse files Browse the repository at this point in the history
  • Loading branch information
wasserth committed Jan 30, 2025
1 parent 3df680c commit dadc00d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nnunetv2/inference/predict_from_raw_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def initialize_from_trained_model_folder(self, model_training_output_dir: str,
for i, f in enumerate(use_folds):
f = int(f) if f != 'all' else f
checkpoint = torch.load(join(model_training_output_dir, f'fold_{f}', checkpoint_name),
map_location=torch.device('cpu'))
map_location=torch.device('cpu'), weights_only=False)
if i == 0:
trainer_name = checkpoint['trainer_name']
configuration_name = checkpoint['init_args']['configuration']
Expand Down

0 comments on commit dadc00d

Please sign in to comment.