thuiar / MMSA

MMSA is a unified framework for Multimodal Sentiment Analysis.
MIT License
642 stars 104 forks source link

python run.py has thses problems. when I train V1 version. #52

Closed 2110310010 closed 2 years ago

2110310010 commented 2 years ago

File "run.py", line 300, in worker() run_normal(args) File "run.py", line 174, in run_normal test_results = run(args) model = AMIO(args).to(device) File "D:\net\MMSA-master\models\AMIO.py", line 44, in init lastModel = MODEL_MAP[args.modelName] KeyError: 'MTFN'

FlameSky-S commented 2 years ago

Should be 'mtfn' (lower case), please check your input args.

2110310010 commented 2 years ago

hello, After I change it to lowercase, it will still appear KeyError: mtfn I'm running ,putting python run.py --modelName mtfn --DatasetNmae sims

2110310010 commented 2 years ago

if I directly run run.py , it will appear TypeError: 'bool' object is not callable

FlameSky-S commented 2 years ago

After I change it to lowercase, it will still appear KeyError: mtfn

The MODEL_MAP dictionary has key, 'mtfn'. So this shouldn't happen. Please check if you've edited the code.

if I directly run run.py , it will appear TypeError: 'bool' object is not callable

Cannot reproduce this problem. Need more information.

2110310010 commented 2 years ago

Traceback (most recent call last): File "D:/net/MMSA-v_1.0/run.py", line 300, in worker() File "D:/net/MMSA-v_1.0/run.py", line 254, in worker run_normal(args) File "D:/net/MMSA-v_1.0/run.py", line 174, in run_normal test_results = run(args) File "D:/net/MMSA-v_1.0/run.py", line 59, in run model = AMIO(args).to(device) File "D:\net\MMSA-v_1.0\models\AMIO.py", line 46, in init self.Model = lastModel(args) File "D:\net\MMSA-v_1.0\models\singleTask\BERT_MAG.py", line 378, in init self.pretrainedBertPath, args=args, num_labels=1, File "D:\anaconda\envs\MMSA\lib\site-packages\transformers\modeling_utils.py", line 1934, in from_pretrained kwargs, File "D:\anaconda\envs\MMSA\lib\site-packages\transformers\configuration_utils.py", line 526, in from_pretrained config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, kwargs) File "D:\anaconda\envs\MMSA\lib\site-packages\transformers\configuration_utils.py", line 551, in get_config_dict original_kwargs = copy.deepcopy(kwargs) File "D:\anaconda\envs\MMSA\lib\copy.py", line 150, in deepcopy y = copier(x, memo) File "D:\anaconda\envs\MMSA\lib\copy.py", line 240, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "D:\anaconda\envs\MMSA\lib\copy.py", line 169, in deepcopy rv = reductor(4) TypeError: 'bool' object is not callable hello,I appear this problem.Thanks!

FlameSky-S commented 2 years ago

This is not a problem of MMSA. Please check the version of your dependencies and Python itself.

2110310010 commented 2 years ago

hi ,I installed it according to your requirements.txt, but the libraries you gave are some low versions, and the code is really in the high version.

FlameSky-S commented 2 years ago

The 1.0 version is no longer maintained. The code ran ok back then, but there's no guarantee it still works now.

You can try installing the dependencies' latest versions by replacing == with >= in the requirements.txt and see if it works.

It is highly recommended that you use the main branch.