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

json文件格式出现问题 #44

Open
Eren139 opened this issue Mar 25, 2024 · 1 comment
Open

json文件格式出现问题 #44

Eren139 opened this issue Mar 25, 2024 · 1 comment

Comments

@Eren139
Copy link

Eren139 commented Mar 25, 2024

File "finetune_lora.py", line 115, in
main()
File "finetune_lora.py", line 88, in main
train_data = InstrutionDataset(
File "/root/autodl-tmp/LexiLaw/src/data.py", line 22, in init
sample = json.loads(line.strip())
File "/root/miniconda3/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/root/miniconda3/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/root/miniconda3/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
出现这个问题是什么意思呢?

@17182684
Copy link

17182684 commented May 6, 2024

json文件中每一条数据应该换行,否则识别出一行数据会有多个dict

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