Closed liuyuyan2717 closed 11 months ago
Describe the bug 运行中文对抗样本实例,报错 AttributeError Traceback (most recent call last) in <cell line: 17>() 15 from textattack.goal_functions import UntargetedClassification 16 ---> 17 from textattack import Attack, Attacker, AttackArgs 18 from textattack.loggers import CSVLogger 19 from textattack.datasets import Dataset, HuggingFaceDataset
3 frames /content/drive/MyDrive/pytorch_file/TextAttack/TextAttack/textattack/commands/eval_model_command.py in 18 from textattack.model_args import HUGGINGFACE_MODELS, TEXTATTACK_MODELS 19 ---> 20 logger = textattack.shared.utils.logger 21 22
AttributeError: partially initialized module 'textattack' has no attribute 'shared' (most likely due to a circular import)
Describe the bug 运行中文对抗样本实例,报错 AttributeError Traceback (most recent call last) in <cell line: 17>()
15 from textattack.goal_functions import UntargetedClassification
16
---> 17 from textattack import Attack, Attacker, AttackArgs
18 from textattack.loggers import CSVLogger
19 from textattack.datasets import Dataset, HuggingFaceDataset
3 frames /content/drive/MyDrive/pytorch_file/TextAttack/TextAttack/textattack/commands/eval_model_command.py in
18 from textattack.model_args import HUGGINGFACE_MODELS, TEXTATTACK_MODELS
19
---> 20 logger = textattack.shared.utils.logger
21
22
AttributeError: partially initialized module 'textattack' has no attribute 'shared' (most likely due to a circular import)