diff --git a/alphadia/workflow/manager.py b/alphadia/workflow/manager.py index 4766d474..a7e40297 100644 --- a/alphadia/workflow/manager.py +++ b/alphadia/workflow/manager.py @@ -820,7 +820,9 @@ def load_classifier_store(self, path: None | str = None): if classifier_hash not in self.classifier_store: classifier = deepcopy(self.classifier_base) - classifier.from_state_dict(torch.load(os.path.join(path, file))) + classifier.from_state_dict( + torch.load(os.path.join(path, file), weights_only=False) + ) self.classifier_store[classifier_hash].append(classifier) def get_classifier(self, available_columns: list, version: int = -1): diff --git a/tests/unit_tests/test_fdr.py b/tests/unit_tests/test_fdr.py index d2aa30db..5412a337 100644 --- a/tests/unit_tests/test_fdr.py +++ b/tests/unit_tests/test_fdr.py @@ -280,7 +280,9 @@ def test_feed_forward_save(): new_classifier = fdrx.BinaryClassifierLegacy() new_classifier.from_state_dict( - torch.load(os.path.join(tempfolder, "test_feed_forward_save.pth")) + torch.load( + os.path.join(tempfolder, "test_feed_forward_save.pth"), weights_only=False + ) ) y_pred = new_classifier.predict(x) # noqa: F841 # TODO fix this test