diff --git a/flair/file_utils.py b/flair/file_utils.py index 518d69e809..53fac0f75b 100644 --- a/flair/file_utils.py +++ b/flair/file_utils.py @@ -382,4 +382,4 @@ def load_torch_state(model_file: str) -> dict[str, typing.Any]: # to load models on some Mac/Windows setups # see https://github.com/zalandoresearch/flair/issues/351 f = load_big_file(model_file) - return torch.load(f, map_location="cpu") + return torch.load(f, map_location="cpu", weights_only=False) diff --git a/requirements.txt b/requirements.txt index 2704114ace..39cf750c66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,7 @@ scikit-learn>=1.0.2 segtok>=1.5.11 sqlitedict>=2.0.0 tabulate>=0.8.10 -torch>=1.5.0,!=1.8 +torch>=1.13.1 tqdm>=4.63.0 transformer-smaller-training-vocab>=0.2.3 transformers[sentencepiece]>=4.25.0,<5.0.0