From 605925fffa11dae2fc6be212c2fe168df0127dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E7=89=B9=E9=A9=B9?= Date: Wed, 21 May 2025 10:36:51 +0800 Subject: [PATCH] =?UTF-8?q?[contrib][PyTorch][albert]=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?torch.load=E5=85=A5=E5=8F=82weights=5Fonly=E7=9A=84=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/requirements.txt | 2 +- PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/run_classifier.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/requirements.txt b/PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/requirements.txt index 7136ba31e1..34af520fa7 100644 --- a/PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/requirements.txt +++ b/PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/requirements.txt @@ -7,4 +7,4 @@ requests==2.25.1 tqdm==4.61.1 numpy==1.23.4 matplotlib==3.4.3 -scikit_learn==0.24.2 +scikit-learn==0.24.2 diff --git a/PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/run_classifier.py b/PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/run_classifier.py index 39229356db..03602d6314 100644 --- a/PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/run_classifier.py +++ b/PyTorch/contrib/nlp/albert_ID0335_for_PyTorch/run_classifier.py @@ -291,7 +291,7 @@ def load_and_cache_examples(args, task, tokenizer, data_type='train'): str(task))) if os.path.exists(cached_features_file): logger.info("Loading features from cached file %s", cached_features_file) - features = torch.load(cached_features_file) + features = torch.load(cached_features_file, weights_only=False) else: logger.info("Creating features from dataset file at %s", args.data_dir) label_list = processor.get_labels() -- Gitee