thu-coai / Emotional-Support-Conversation

Data and codes for ACL 2021 paper: Towards Emotional Support Dialog Systems
Other
219 stars 32 forks source link

运行infer_vanilla.sh时出现valueError #35

Closed y-y-name closed 1 month ago

y-y-name commented 1 month ago

错误如下: ValueError: The following model_kwargs are not used by the model: ['batch_size']

caoyaru123 commented 1 month ago

请问,这个问题有解决吗?求助 谢谢

chujiezheng commented 1 month ago

You should upload the error screenshot. Also, you may downgrade the version of transformers to the one released in early 2021. Many issues are caused by the back-incompatibility of new versions.

caoyaru123 commented 1 month ago

在运行infer_vanilla.sh时,提示如下错误: inferring: 0%| | 0/195 [00:00<?, ?it/s] Traceback (most recent call last): File "/data/ESConv_CoT_work/Emotional-Support-Conversation-main/codes_zcj/infer.py", line 190, in encoded_info, generations = model.generate(batch) File "/home/anaconda3/envs/cuda2/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context return func(*args, *kwargs) File "/data3/ESConv_CoT_work/Emotional-Support-Conversation-main/codes_zcj/models/vanilla_blenderbot_small.py", line 116, in generate generations = super().generate( File "/home/anaconda3/envs/cuda2/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context return func(args, kwargs) File "/home/anaconda3/envs/cuda2/lib/python3.8/site-packages/transformers/generation_utils.py", line 1268, in generate self._validate_model_kwargs(model_kwargs.copy()) File "/home/anaconda3/envs/cuda2/lib/python3.8/site-packages/transformers/generation_utils.py", line 964, in _validate_model_kwargs raise ValueError( ValueError: The following model_kwargs are not used by the model: ['batch_size'] (note: typos in the generate arguments will also show up in this list) 目前版本是transformers==4.24.0 但是旧的版本 安装时总是提示找不到库,如下 Channels:

PackagesNotFoundError: The following packages are not available from current channels:

Current channels:

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

chujiezheng commented 1 month ago

I think it is an issue regarding the new versions' back-incompatibility. You should install transformers via pip.

caoyaru123 commented 1 month ago

这个问题解决了,thank you