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

fix: 修复function call数据集如果 function_call 值的为不合法json,异常提示且中断训练。 #5483

Merged
merged 5 commits into from
Sep 19, 2024

Conversation

whybeyoung
Copy link
Contributor

What does this PR do?

functioncall数据训练的时候,如果function message的json字符串不合法,比如中间有些非法json控制字符比如换行;json.load无法加载,此时置空functions不报任何错误会让用户很疑惑,难以定位。

Fixes # (issue)
故抛出RuntimeError异常

Before submitting

@hiyouga hiyouga self-requested a review September 19, 2024 07:13
src/llamafactory/data/formatter.py Show resolved Hide resolved
Copy link
Owner

@hiyouga hiyouga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hiyouga hiyouga merged commit af8dfb5 into hiyouga:main Sep 19, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants