Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

情感分类支持微调吗? #22

Open
hw-cw opened this issue Apr 11, 2023 · 2 comments
Open

情感分类支持微调吗? #22

hw-cw opened this issue Apr 11, 2023 · 2 comments

Comments

@hw-cw
Copy link

hw-cw commented Apr 11, 2023

训练集:
{"content": "不错的上网本,外形很漂亮,操作系统应该是个很大的 卖点,电池还可以。整体上讲,作为一个上网本的定位,还是不错的。\t", "result_list": [{"text": "正向", "start": -7, "end": -5}], "prompt": "情感倾向[正向,负向]"}
{"content": "<荐书> 推荐所有喜欢<红楼>的红迷们一定要收藏这本书,要知道当年我听说这本书的时候花很长时间去图书馆找和借都没能如愿,所以这次一看到当当有,马上买了,红迷们也要记得备货哦!\t", "result_list": [{"text": "正向", "start": -4, "end": -2}], "prompt": "情感倾向[负向,正向]"}

用这个去微调情感分类会报错显示:
RequestsDependencyWarning)
Traceback (most recent call last):
File "finetune.py", line 253, in
do_train()
File "finetune.py", line 35, in do_train
tokenizer = BertTokenizerFast.from_pretrained(args.model)
File "/home/ma-user/anaconda3/envs/PyTorch-1.8/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1706, in from_pretrained
local_files_only=local_files_only,
File "/home/ma-user/anaconda3/envs/PyTorch-1.8/lib/python3.7/site-packages/transformers/utils/hub.py", line 711, in get_file_from_repo
use_auth_token=use_auth_token,
File "/home/ma-user/anaconda3/envs/PyTorch-1.8/lib/python3.7/site-packages/transformers/utils/hub.py", line 292, in cached_path
local_files_only=local_files_only,
File "/home/ma-user/anaconda3/envs/PyTorch-1.8/lib/python3.7/site-packages/transformers/utils/hub.py", line 563, in get_from_cache
"Connection error, and we cannot find the requested files in the cached path."
ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on.

@NickThrone
Copy link

应该支持吧,就是不太清楚数据集的时候,----task_type 应该设置成什么样子。

@NickThrone
Copy link

支持,我看了,--task_type应该设置成 cls,就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants