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

关于工具训练时候报错TypeError: 'NoneType' object is not iterable解决方法 #546

Open
1 of 2 tasks
kylinccc opened this issue Sep 5, 2024 · 0 comments
Open
1 of 2 tasks
Assignees

Comments

@kylinccc
Copy link

kylinccc commented Sep 5, 2024

System Info / 系統信息

transformers:4.43.4
cuda:12.4
GPU:4080s
python:3.10.12

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

使用工具模式数据来lora训练的时候会报错TypeError: 'NoneType' object is not iterable
image
打印一下数据发现每段对话里都会出现一个'tools': None
image
应该是这个导致的
在process_batch方法和process_batch_eval方法里都加上这三行代码就可以正常训练下去了
image
没有去找数据解析是datasets库做的还是案例程序做的,不确定是否为训练案例的bug,仅分享出来给同样出现这个问题的人提供一个解决办法

Expected behavior / 期待表现

数据正确处理

@sixsixcoder sixsixcoder self-assigned this Sep 5, 2024
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