Skip to content

fine tune for json does not work #415

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

Closed
javixeneize opened this issue Apr 25, 2023 · 5 comments
Closed

fine tune for json does not work #415

javixeneize opened this issue Apr 25, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@javixeneize
Copy link

Describe the bug

I am parsing a json file with the command openai tools fine_tunes.prepare_data -f javi.json, and i always have this error message:

Analyzing...

ERROR in read_any_format validator: Your file javi.json does not appear to be in valid JSON format. Please ensure your file is formatted as a valid JSON file.

Aborting...%

It does not matter whats the content of the file, even with something as simple as { "name": "javi"} it throws this error

To Reproduce

Create a json file with any content

Run openai tools fine_tunes.prepare_data -f javi.json

It errors

Code snippets

No response

OS

Monterrey

Python version

Python 3.9.6

Library version

openai 0.27.4

@javixeneize javixeneize added the bug Something isn't working label Apr 25, 2023
@shawnesquivel
Copy link

getting the same error
OS ventura 13.3.1
openai 0.27.4
pandas 2.0.1

my json format:

[
{
"prompt": "Write a summary of Luka Doncic statistics:",
"completion": "Luka Doncic played 19 games, starting 19 of them. He had an average of 37.4 minutes per game, scoring 33.5 points per game. He made 218 out of 432 field goals, for a field goal percentage of 50.5. He made 46 out of 146 three-point field goals, for a three-point field goal percentage of 31.5. He made 154 out of 213 free throws, for a free throw percentage of 72.3. He plays as PG for the DAL."
},
{
"prompt": "Write a summary of Stephen Curry statistics:",
"completion": "Stephen Curry played 20 games, starting 20 of them. He had an average of 34.7 minutes per game, scoring 31.4 points per game. He made 214 out of 413 field goals, for a field goal percentage of 51.8. He made 103 out of 236 three-point field goals, for a three-point field goal percentage of 43.6. He made 97 out of 107 free throws, for a free throw percentage of 90.7. He plays as PG for the GS."
}
]

@shawnesquivel
Copy link

Hi @javixeneize, this did the trick for me. Referenced from #296

 pip install openai==0.25.0

@javixeneize
Copy link
Author

Downgrading to 0.25? I didn’t expect that 😳.
Will try tomorrow. Thanks!!

@shawnesquivel
Copy link

Downgrading to 0.25? I didn’t expect that 😳. Will try tomorrow. Thanks!!

Yeah, not the best solution. Hoping someone else has a less hacky way of fixing it 😆

@zzj0402
Copy link

zzj0402 commented May 24, 2023

Confirmed. The new version of prep data thing is not working. Nothing is jsonl for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants