-
Notifications
You must be signed in to change notification settings - Fork 550
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
预训练了2轮半,强制结束,任务微调时出现错误:NameError: name '加完班回到家窝在沙发里' is not defined #20
Comments
https://github.com/jingyaogong/minimind/blob/master/model/dataset.py
用新代码跳过个别这种所谓的“非法Python标识符的字符串”异常数据吧 |
还是有报错
|
你的sft_data.csv文件可以分享一下吗,否则可能无法复现你的结果 |
昨天从百度网盘下载的,就是Readme里提供的这个: def __getitem__(self, index: int):
#
sample = self.df.iloc[index]
history = self.safe_eval(sample['history'])
q = sample['q']
a = sample['a']
messages = []
for history_message in history:
if len(history_message) <= 1:
continue
# 确保 content 是字符串
messages.append(
{"role": 'user', "content": str(history_message[0])[:self.max_length // 2]}
)
messages.append(
{"role": 'assistant', "content": str(history_message[1])[:self.max_length // 2]}
)
# 确保 q 和 a 是字符串
messages += [
{"role": "user", "content": str(q)},
{"role": "assistant", "content": str(a)},
] |
好的,很奇怪我这边测试正常,那我也先加上str强转了 3Q |
微调时错误如下:
这是不让加完班回到家窝在沙发里吗?
The text was updated successfully, but these errors were encountered: