diff --git a/medkit/text/ner/nlstruct_entity_matcher.py b/medkit/text/ner/nlstruct_entity_matcher.py index a8bb7493..03cfa7cd 100644 --- a/medkit/text/ner/nlstruct_entity_matcher.py +++ b/medkit/text/ner/nlstruct_entity_matcher.py @@ -128,7 +128,7 @@ def _load_from_checkpoint_dir(checkpoint_dir: Path, device): # Force the filename to use the checkpoint directory checkpoint_filepath = checkpoint_filepaths[0] - loaded = torch.load(checkpoint_filepath, map_location=device) + loaded = torch.load(checkpoint_filepath, map_location=device, weights_only=False) config = loaded["config"] # modify config if the encoder is a 'concat'model